我遵循了几个链接来尝试解决这个问题,例如link1,他们要求我在环境变量中包含exe的路径。这是我尝试的以下命令,以获得此错误
D:\Gesture Recognition\Gesture Recognition\Debug>./"Gesture Recognition.exe"
rawrec1.trr
和错误
'.' is not recognized as an internal or external command,
operable program or batch file.
我将手势识别exe路径包含到环境变量的系统和用户变量中。即使启动系统后,错误仍然存在。有人可以帮我解决这个问题或解决这个问题吗?
只需省略“点斜杠”
./
:
D:\Gesture Recognition\Gesture Recognition\Debug>"Gesture Recognition.exe"
不过,如果你愿意,你可以使用
.\
并且它会起作用。
D:\Gesture Recognition\Gesture Recognition\Debug>.\"Gesture Recognition.exe"
用后斜杠 (\) 替换正斜杠 (/) 即可完成此任务。 Windows 中的文件夹分隔符是 \ 而不是 /
我在 Windows 机器上从 github 克隆了一个存储库,启动 cypress 的命令是
"cypress:open": "../../node_modules/.bin/cypress open"
这给了我这个错误
。 。不被识别为内部或外部命令
我不知道可能在Linux上,命令可能也需要node_modules路径,但在我的Windows机器上只是
"cypress:open": "cypress open"
已经足够了
在尝试使用 tree.export_graphviz 导出决策树有向图时,我在 Windows 8 中遇到了完全相同的错误!然后我从这个link安装了GraphViz。然后我按照以下步骤解决了我的问题:
在 Windows 中使用以下命令时会出现此错误。您只需删除点
'.'
和斜线 '/'
即可运行以下命令。
而不是写:
D:\Gesture Recognition\Gesture Recognition\Debug>./"Gesture Recognition.exe"
写:
D:\Gesture Recognition\Gesture Recognition\Debug>"Gesture Recognition.exe"
我在使用Webpack时也遇到了这个问题。如果软件包是通过 NPM 安装的,理想情况下您不必提供要运行的模块的路径。像这样的东西应该有效:
"build": "webpack --config webpack.config.js",
"start": "webpack serve --config webpack.config.js --open"
根据我的测试,这适用于 Git Bash、Powershell 和命令提示符。
使用
.\
代替 ./
。 Linux 使用正斜杠,而 Windows 使用反斜杠。这在cmd中有效。我希望这有帮助
也许我参加聚会迟到了,但这可以帮助别人 使用
"\\"
代替 "\"
或 "/"
它在 Windows 上对我有用。
我们通常希望脚本能够在linux和windows上运行。因此,使用
./
或 .\
会给其中之一带来问题。
因此,请按如下方式使用
child_process
。它在所有平台上都运行良好。
"preinstall": "node -e \"require('child_process').spawn('sh', ['./preinstall.sh'], { stdio: 'inherit'})\""