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

相关推荐
明月_清风15 分钟前
Deno 终局来了:从挑战 Node 到被 Cloudflare 收编
前端·后端·node.js
Csvn1 小时前
框架性能优化
前端
雪芽蓝域zzs3 小时前
第 5 节:Marker 点击弹出 InfoWindow 信息窗口
vue.js
回眸&啤酒鸭3 小时前
【回眸】OpenSwarm 多智能体协作系统实战指南
大数据·前端·人工智能
用户69371750013843 小时前
2026,程序员的时代拐点到了
android·前端·后端
大龄秃头程序员3 小时前
一次 iBeacon + BLE 无感解锁方案的实现记录
前端
小兔子3 小时前
Python 的 GIL 与 free-threading:3.13 之后「去 GIL」走到哪一步了
前端
IT_陈寒3 小时前
SpringBoot自动配置差点让我加班到凌晨
前端·人工智能·后端
guslegend4 小时前
脚手架原理与本地调试:从 bin 软链接到 npm link
前端·npm·node.js·脚手架·前端工程化
小宋10215 小时前
A2UI从零实战:Agent安全生成交互界面与事件回传
javascript·人工智能·安全·交互