简体   繁体   English

'express' 不是内部或外部命令,也不是可运行的程序或批处理文件

[英]'express' is not recognized as an internal or external command, operable program or batch file

I did npm install -g express and still for some reason getting this error.我做了npm install -g express并且仍然出于某种原因得到这个错误。 Is anyone having the same issue?有人有同样的问题吗?

Found out that express now wants you to use express-generator.发现 express 现在想让你使用 express-generator。 So instead of npm install -g express it is npm install -g express-generator .所以不是npm install -g express而是npm install -g express-generator

run this:运行这个:

sudo npm install -g express-generator

In express(version 4), command line tool isn't bundled together, so the express command won't be recognized until you install the express generator.在 express(版本 4)中,命令行工具没有捆绑在一起,因此在安装 express 生成器之前,express 命令不会被识别。

I solved this similar issue by adding NPM global modules to my path variable.我通过将 NPM 全局模块添加到我的路径变量中解决了这个类似的问题。

Try add C:\\Users<youruser>\\AppData\\Roaming\\npm to your path.尝试将 C:\\Users<youruser>\\AppData\\Roaming\\npm 添加到您的路径中。

暂无
暂无

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

相关问题 &#39;lightercollective&#39; 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'lightercollective' is not recognized as an internal or external command, operable program or batch file 无法将“ nodemon”识别为内部或外部命令,可操作程序或批处理文件 - 'nodemon' is not recognized as an internal or external command, operable program or batch file 无法将“节点”识别为内部或外部命令,可操作程序或批处理文件 - 'node' is not recognized as an internal or external command, operable program or batch file &#39;cocos&#39;不被识别为内部或外部命令,可操作程序或批处理文件 - 'cocos' is not recognized as an internal or external command, operable program or batch file &#39;。&#39; 不被识别为内部或外部命令,可操作程序或批处理文件 - '.' is not recognized as an internal or external command, operable program or batch file &#39;&#39; 不被识别为内部或外部命令,可操作程序或批处理文件 - '.' is not recognized as an internal or external command, operable program or batch file 'GOOS' 不是内部或外部命令,也不是可运行的程序 或批处理文件 - 'GOOS' is not recognized as an internal or external command, operable program or batch file 'CI' 不是内部或外部命令,也不是可运行的程序 或批处理文件 - 'CI' is not recognized as an internal or external command, operable program or batch file 'firebase' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'firebase' is not recognized as an internal or external command, operable program or batch file 在 Windows 上运行forever.js 时出错-“&#39;C:\\Program&#39; 不是内部或外部命令、可运行的程序或批处理文件” - Error running forever.js on Windows - "'C:\Program' is not recognized as an internal or external command, operable program or batch file"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM