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

相关推荐
一只小bit2 分钟前
Qt 事件:覆盖介绍、处理、各种类型及运用全详解
前端·c++·qt·cpp
Never_Satisfied7 分钟前
在JavaScript / HTML中,HTML元素自定义属性使用指南
开发语言·javascript·html
前端 贾公子12 分钟前
husky 9.0升级指南
javascript
人道领域17 分钟前
JavaWeb从入门到进阶(前端工程化)
前端
shughui26 分钟前
APP、Web、H5、iOS与Android的区别及关系
android·前端·ios
Amumu1213831 分钟前
React Router 6介绍
前端·react.js·前端框架
南村群童欺我老无力.37 分钟前
Flutter 框架跨平台鸿蒙开发 - 打造表情包制作器应用
开发语言·javascript·flutter·华为·harmonyos
山峰哥41 分钟前
SQL调优实战:让查询效率飙升10倍的降本密码
服务器·前端·数据库·sql·编辑器·深度优先
摘星编程43 分钟前
React Native for OpenHarmony 实战:MediaPlayer 播放器详解
javascript·react native·react.js
TAEHENGV1 小时前
React Native for OpenHarmony 实战:反应测试实现
javascript·react native·react.js