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

相关推荐
科研邪修法1 小时前
PDF新增页面文字与文本批注怎么区分?以双版本培训讲义为例
前端·css·pdf
武昌库里写JAVA1 小时前
SpringBoot+Vue 项目介绍
java·javascript·git·sql·ai
Lanwarf-前端开发2 小时前
Vue3 + Canvas/WebGL 雷达扫描可视化实战:PPI、RHI、VOL、SVOL 四种模式原理与实现
前端·javascript·vue.js·webgl
FRing033 小时前
vue3干货总结2(vue3生命周期、父子通信、模版引用、provide和inject)
开发语言·前端·vue.js·vue3
锋行天下5 小时前
langgraph 全栈项目(三)
前端·人工智能·后端
YIAN5 小时前
从 LangChain 到 DeepAgents:手把手拆解 createAgent、Middleware 与复杂 Agent
javascript·langchain·deepseek
锋行天下5 小时前
langgraph 全栈项目(二)
前端·人工智能·后端
冬夜Zis6 小时前
顺着作用域链和 outer 指针,一次性看懂闭包底层逻辑
javascript
Ceelog6 小时前
Mac 上怎么找出并安全清理旧的 node_modules?(实测 304 个占 66.3 GB)
javascript