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

相关推荐
问心无愧05137 小时前
ctf show web入门160 161
前端·笔记
李小白667 小时前
第四天-WEB服务器基本原理,IIS服务
运维·服务器·前端
humcomm8 小时前
AI编程时代新前端职位
前端·ai编程
好家伙VCC8 小时前
Web Components主题热切换方案揭秘
java·前端
甲维斯8 小时前
Kimi版超级玛丽效果“惊人”,配额不足5厘米!
前端·人工智能
hboot8 小时前
AI工程师第一课 - Python
前端·后端·python
凉菜凉凉8 小时前
AI时代,被抛弃的前端
前端·ai
console.log('npc')9 小时前
AI前端工程与生成式UI学习路线
前端·人工智能·ui
huangdong_9 小时前
淘宝商品SKU图自动分类技术深度解析:从DOM解析到智能归档
开发语言·javascript·ecmascript
梦曦i9 小时前
uni-router v1.1.1发布:守卫超时保护+路由监听
前端·uni-app