问题描述
几周前,rake 突然无法识别相对路径,并不断给我错误消息:
'.' is not recognized as an internal or external command
这是它发生的地方之一:
> chipmunk.client@1.0.0 prod
> ./node_modules/.bin/ng build --prod --aot --outputHashing=all
'.' is not recognized as an internal or external command,operable program or batch file.
rake aborted!
在 package.json
文件中,我从那里获取命令,它被写为:
"prod": "./node_modules/.bin/ng build --prod --aot --outputHashing=all"
只要我删除路径并只写 ng
,它就会起作用:
"prod": "ng build --prod --aot --outputHashing=all"
到目前为止我尝试过的:
- 删除路径(有效 - 但想避免)
- 使用不同的命令行(
cmd.exe
、powershell
、git shell
)(没有帮助) - 重新安装
rake
、nodeJS
和我使用的所有其他东西(没有帮助) - 重新启动 Visual Studio Code(没有帮助)
- 更新 Visual Studio Code(没有帮助)
- 更新我的电脑(没有帮助)
- 重新启动我的电脑(没有帮助)
我也在 '.' is not recognized as an internal or external command, 中看到了一个非常相似的问题,但他们建议在 package.json
文件中删除路径或更改其他内容,如果可能,我想避免这样做。
我正在使用 Windows 10(以防万一)。 在其他装有 Windows 10 的 PC 和我的 Ubuntu VM 上,它运行良好,没有任何问题,只是在那台 PC 上出现此错误。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)