当前位置:网站首页>npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
2022-07-03 03:23:00 【水w】
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
目录
2、以管理员身份运行cmd,输入命令,初始化package.json文件
三、下载npm install @escook/request-miniprogram
一、报错:
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,
然后再试一次。
所在位置 行:1 字符: 1
+ npm init -y
+ ~~~
+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
二、解决:
1、安装node.js
(1)进入官网下载 | Node.js 中文网
(2)按照自己电脑的位数进行下载,等待下载完成,
(3)运行刚刚下载的文件,会出现安装流程,按照安装流程一步步走,
点击“next”,
勾选“接收”,点击“next”,
可以根据自己需要改变安装路径,此处我是安装到D盘上了,点击“next”,
点击“next”,
(4)在cmd中运行下列命令,检测node.js是否已经安装成功,
node -v
npm -v
node.js安装过程中的报错问题:
注意:我们可以看到第二个命令执行之后,报错了。
如何解决 npm WARN 配置全局'–global', '–local' 已弃用。使用“–location=global”代替“Error?
解决node.js安装过程中的报错问题:
(1)首先找到刚刚安装路径下的node.js文件夹,找到“npm”和“npm.cmd”这2个文件,
(2)
- “npm”文件可以用记事本打开,
- “npm.cmd”文件可以用vscode打开,
找到这2个文件里面的prefix -g
替换为
prefix --location=global
(3)“npm”文件修改前:
修改后,“npm”文件为:
(4) “npm.cmd”文件修改后为:
(5)修改完之后、关闭之前的cmd。我们重新打开一个新的cmd,在cmd中重新输入命令
可以看到没有报错了!!!
OK,问题已经解决。
2、以管理员身份运行cmd,输入命令,初始化package.json文件
npm init -y
可以看到cmd命令行没有报错了,
而且项目文件夹下也出现了一个新的文件“pachage.json”,
初始化package.json文件成功!!!
三、下载npm install @escook/request-miniprogram
npm install @escook/request-miniprogram
继续在cmd窗口输入下条命令,
OK。
边栏推荐
- Basic information of Promethus (I)
- 900W+ 数据,从 17s 到 300ms,如何操作
- MySql实战45讲【事务隔离】
- New programmers use the isXXX form to define Boolean types in the morning, and are discouraged in the afternoon?
- 45 lectures on MySQL [index]
- [mathematical logic] propositions and connectives (propositions | propositional symbolization | truth connectives | no | conjunction | disjunction | non truth connectives | implication | equivalence)
- Yolov5 project based on QT
- 使用InputFilter限制EditText时踩坑及解决方案
- Pytorch轻量级可视化工具wandb(local)
- 从输入URL到页面展示这中间发生了什么?
猜你喜欢
numpy之 警告VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences
3D drawing example
PAT乙级“1104 天长地久”DFS优化思路
用Three.js做一个简单的3D场景
Nanning water leakage detection: warmly congratulate Guangxi Zhongshui on winning the first famous brand in Guangxi
Use of El tree search method
el-tree搜索方法使用
MySQL practice 45 lecture [transaction isolation]
Pytoch configuration
Hi3536C V100R001C02SPC040 交叉编译器安装
随机推荐
用Three.js做一個簡單的3D場景
VS 2019 配置tensorRT生成engine
Solve high and send system Currenttimemillis Caton
Elsevier latex 提交文章 pdftex.def Error: File `thumbnails/cas-email.jpeg‘ not found: using draf
BigVision代码
[pyg] understand the messagepassing process, GCN demo details
MongoDB主配置文件
Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence
[set theory] partial order relation (partial order relation definition | partial order set definition | greater than or equal to relation | less than or equal to relation | integer division relation |
[algebraic structure] group (definition of group | basic properties of group | proof method of group | commutative group)
MongoDB基本操作【增、删、改、查】
Mongodb replication set [master-slave replication]
The file marked by labelme is converted to yolov5 format
MongoDB簡介
The idea setting code is in UTF-8 idea Properties configuration file Chinese garbled
[MySQL] the difference between left join, right join and join
Gavin teacher's perception of transformer live class - rasa project's actual banking financial BOT Intelligent Business Dialogue robot architecture, process and phenomenon decryption through rasa inte
[leetcode question brushing day 34] 540 Unique element in array, 384 Disrupt array, 202 Happy number, 149 Maximum number of points on a line
node,npm以及yarn下载安装
idea 加载不了应用市场解决办法(亲测)