运行vue项目,显示“npm”无法识别为 cmdlet、函数、脚本文件或可操作程序的名称

PS D:\weduproject\wedu1\wedu\wedu-fast-vue> npm run dev,运行时出现像下面这样的报红信息,

npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check

the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

  • npm run dev

  • ~~~

  • CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException

  • FullyQualifiedErrorId : CommandNotFoundException

原因:没有使用管理员打开vscode,使用管理员打开vscode就可以了。

相关推荐
u***u6852 小时前
React环境
前端·react.js·前端框架
X***E4632 小时前
前端数据分析应用
前端·数据挖掘·数据分析
4***14902 小时前
React社区
前端·react.js·前端框架
LFly_ice2 小时前
学习React-24-路由传参
前端·学习·react.js
Lhuu(重开版3 小时前
CSS:动效布局动画
前端·css
Q***K553 小时前
前端构建工具
前端
laocooon5238578863 小时前
创建了一个带悬停效果的“我的个人主页“按钮
前端
2013编程爱好者4 小时前
Vue工程结构分析
前端·javascript·vue.js·typescript·前端框架
小满zs5 小时前
Next.js第十一章(渲染基础概念)
前端
不羁的fang少年6 小时前
前端常见问题(vue,css,html,js等)
前端·javascript·css