当前位置:网站首页>【npm】 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
【npm】 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
2022-07-27 16:18:00 【猫的幻想曲】
在配置一项目环境变量时:
安装依赖:
$ npm i -g @tarojs/[email protected]
$ npm install爆出以下错误:
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然
后再试一次。
所在位置 行:1 字符: 1
+ npm i -g @tarojs/[email protected]
+ ~~~
+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

其原因为:未配置Node.js的系统环境变量。
解决方法如下:
此电脑右键 ---> 高级配置 --> 环境变量
在系统环境变量中添加 NODE_PATH ,路径为 自己安装Node.js的路径。
再点开-系统变量中的path路径:添加 %NODE_PATH%

然后点击确定。
最后重启电脑,即可。
安装Node.js ,可在我的 资源里找。
边栏推荐
- I was forced to optimize the API gateway query interface
- 怎么会不喜欢呢,CI/CD中轻松发送邮件
- 迷你洗衣机触摸芯片-DLT8MA12TS-杰力科创
- A case to understand MySQL view
- 虚拟偶像的歌声原来是这样生成的!
- 全身多功能按摩仪芯片-DLTAP602SD
- Solve the problem of JSP cascading
- 浴室带除雾化妆镜触摸芯片-DLT8T10S
- The song of the virtual idol was originally generated in this way!
- Log4j epic loopholes, big companies like jd.com have been recruited
猜你喜欢
随机推荐
Class not found: "the com.parkmanagement.dao.daotest test cannot find the test class
2021.7.13 note sub query
Uni app label jump
Must the MySQL query column be consistent with the group by field?
低噪负离子风扇触摸IC
虚拟偶像的歌声原来是这样生成的!
[mit 6.s081] LEC 9: interrupts notes
Wechat applet multi file upload
TS learning notes interface
Generate PDM file from Navicat export table
js实现简易表单验证与全选功能
2021.7.12 internal and external connection of notes
A case to understand MySQL view
2021.7.19 notes DML
Commonly used built-in methods of mybtis plus
Knowledge map pyhanlp realizes named body recognition (with named body recognition code)
Graphical interface programming
INSUFFICIENT_ ACCESS_ ON_ CROSS_ REFERENCE_ ENTITY APEX / SALESFORCE
MySQL basic statement
rsa加解密(兼容微信小程序环境)








