繁体   English   中英

运行项目时,“open”未被识别为内部或外部命令(npm start)

[英]'open' is not recognized as an internal or external command while running project (npm start)

我已经从 github alt-tutorial克隆了这个项目

运行命令 npm start 时出现此错误错误截图

如果您使用的是 Windows,请使用start open是一个 unix 命令,所以在 Windows 机器上不起作用。 例如,如果您在 Windows 环境中有如下命令:

"scripts": {
    "start": "webpack && open index.html"
},

请改用以下内容:

"scripts": {
    "start": "webpack && start index.html"
},

您能否使用以下命令清除npm缓存npm试。

npm cache clean

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM