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

相关推荐
橙露13 小时前
React Hooks 深度解析:从基础使用到自定义 Hooks 的封装技巧
javascript·react.js·ecmascript
Exquisite.13 小时前
Nginx
服务器·前端·nginx
2501_9209317013 小时前
React Native鸿蒙跨平台使用useState管理健康记录和过滤状态,支持多种健康数据类型(血压、体重等)并实现按类型过滤功能
javascript·react native·react.js·ecmascript·harmonyos
打小就很皮...13 小时前
dnd-kit 实现表格拖拽排序
前端·react.js·表格拖拽·dnd-kit
Ulyanov14 小时前
从静态到沉浸:打造惊艳的Web技术发展历程3D时间轴
前端·javascript·html5·gui开发
打小就很皮...14 小时前
React 19 + Vite 6 + SWC 构建优化实践
前端·react.js·vite·swc
Highcharts.js14 小时前
使用Highcharts与React集成 官网文档使用说明
前端·react.js·前端框架·react·highcharts·官方文档
这是个栗子14 小时前
AI辅助编程(二) - 通译千问
前端·ai·通译千问
VT.馒头14 小时前
【力扣】2625. 扁平化嵌套数组
前端·javascript·算法·leetcode·职场和发展·typescript
数研小生14 小时前
Full Analysis of Taobao Item Detail API taobao.item.get
java·服务器·前端