简体   繁体   English

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

[英]npm' is not recognized as an internal or external command, operable program or batch file in visual studio

在此处输入图像描述我无法使用ng serve在 Visual Studio 中构建 angular 项目,但我可以使用node.js 命令提示符来完成,请给我解决方案

Aside from the solutions suggested in the links which are posted in the comments, you can also try the below command to update the PATH,除了评论中发布的链接中建议的解决方案外,您还可以尝试使用以下命令来更新 PATH,

set PATH=%PATH%;C:\Users\YOUR_USER_NAME_OR_LOGIN\AppData\Roaming\npm;

Once executed, try re-running your ng serve command again.执行后,再次尝试重新运行ng serve命令。

Hope this helps!希望这可以帮助!

Install Angular cli globally using this command.使用此命令全局安装 Angular cli。

$ npm install -g @angular/cli

the -g switch installs angular cli(or any npm package globally on your system). -g开关会在您的系统上全局安装 angular cli(或任何 npm 包)。

暂无
暂无

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

相关问题 'npm' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'npm' is not recognized as internal or external command, operable program or batch file npm'[…]'不被识别为内部或外部命令,可操作程序或批处理文件 - npm '[…] ' is not recognized as an internal or external command, operable program or batch file NPM + 'DEBUG' 不是内部或外部命令,也不是可运行的程序或批处理文件 - NPM + 'DEBUG' is not recognized as an internal or external command, operable program or batch file 'npm' 不是内部或外部命令,也不是可运行的程序或批处理文件。 然而,运行 npm.cmd 有效 - 'npm' is not recognized as an internal or external command, operable program or batch file. running npm.cmd works however Gitlab CI - npm' 不是内部或外部命令,也不是可运行的程序或批处理文件 - Gitlab CI - npm' is not recognized as an internal or external command, operable program or batch file 在 nodejs 中使用 npm 开始的问题。 'nodemon' 不是内部或外部命令、可运行程序或批处理文件 - poblem with use the npm start in nodejs . 'nodemon' is not recognized as an internal or external command, operable program or batch file 为什么我的'npm start'脚本导致错误:'。'不被识别为内部或外部命令,可操作程序或批处理文件。 - Why is my 'npm start' script resulting in the error: '.' is not recognized as an internal or external command, operable program or batch file.? 'npm' 'node' 不是用于 Windows 的内部或外部命令,也不是可运行的程序或批处理文件 - 'npm' 'node' is not recognized as internal or external command, operable program or batch file for Windows 'eval' 在 windows npm 脚本上未被识别为内部或外部命令、可运行程序或批处理文件 - 'eval' is not recognized as an internal or external command, operable program or batch file on windows npm script 'npm'不被识别为内部或外部命令,可操作程序或批处理文件,但位于我的环境路径中 - 'npm' is not recognized as an internal or external command, operable program or batch file, but it's in my env path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM