运行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就可以了。

相关推荐
2分钟速写快排几秒前
孔乙己的茴字有多少种写法?|AI 对话实时通信的三种实现
前端·javascript·github
Penge6662 小时前
JavaScript:BOM 详解
前端
梯度下降者2 小时前
Nuxt框架
vue.js·服务端渲染·全栈开发·混合渲染·nuxt框架
Penge6662 小时前
Vite vs Webpack:前端构建工具原理与实战
前端
Penge6662 小时前
前端包管理工具:npm、Yarn、pnpm 快速入门
前端
Penge6663 小时前
Sass 了解
前端
Penge6663 小时前
Webpack 打包从 0 到 1 实战笔记
前端
Penge6663 小时前
Webpack 入门:是什么、为什么需要、怎么使用?
前端
Penge6664 小时前
Ant Design(Antd)了解
前端
wangruofeng4 小时前
同一行代码,百种渲染:Asuka、React Native 与 Flutter 跨平台渲染机制深度拆解
前端·github