当前位置:网站首页>NPM: the 'NPM' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is corr
NPM: the 'NPM' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is corr
2022-07-03 03:34:00 【Water W】
npm : Cannot be “npm” Item identified as cmdlet、 function 、 The name of the script file or runnable program . Please check the spelling of the name , If the path is included , Please make sure the path is correct , then try again .
Catalog
node.js Error reporting during installation :
solve node.js Error reporting during installation :
2、 Run as administrator cmd, Enter the command , initialization package.json file
3、 ... and 、 download npm install @escook/request-miniprogram
One 、 Report errors :

npm : Cannot be “npm” Item identified as cmdlet、 function 、 The name of the script file or runnable program . Please check the spelling of the name , If the path is included , Please make sure the path is correct ,
then try again .
The position of That's ok :1 character : 1
+ npm init -y
+ ~~~
+ CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Two 、 solve :
1、 install node.js
(1) Enter official website download | Node.js Chinese net

(2) Download according to the number of digits on your computer , Wait for download to complete ,

(3) Run the file just downloaded , The installation process will appear , Follow the installation process step by step ,

Click on “next”,

Check “ receive ”, Click on “next”,

You can change the installation path according to your needs , Here I install to D It's on the plate , Click on “next”,



Click on “next”,

(4) stay cmd Run the following command in , testing node.js Has it been installed successfully ,
node -v
npm -v
node.js Error reporting during installation :
Be careful : We can see that after the second command is executed , Wrong report .
How to solve npm WARN Configure global '–global', '–local' Have been abandoned . Use “–location=global” Instead of “Error?solve node.js Error reporting during installation :
(1) First, find the installation path node.js Folder , find “npm” and “npm.cmd” this 2 File ,

(2)
- “npm” Files can be opened in Notepad ,
- “npm.cmd” Documents available vscode open ,
Find this 2 In a file prefix -g Replace with
prefix --location=global(3)“npm” Before the document is modified :
After modification ,“npm” File for :

(4) “npm.cmd” The file is modified as :

(5) After the modification 、 Before closing cmd. We reopen a new cmd, stay cmd Re enter the command
You can see that there is no mistake !!!

OK, The problem has been solved .
2、 Run as administrator cmd, Enter the command , initialization package.json file
npm init -yYou can see cmd The command line did not report an error ,

And a new file also appears under the project folder “pachage.json”,

initialization package.json File successfully !!!
3、 ... and 、 download npm install @escook/request-miniprogram
npm install @escook/request-miniprogramContinue to cmd Enter the next command in the window ,

OK.
边栏推荐
- float与0比较
- umi 路由拦截(简单粗暴)
- Pat class B common function Usage Summary
- Applet (continuous update)
- Réglez la hauteur et lancez le système. Currenttimemillis catton
- QT based tensorrt accelerated yolov5
- 将时间戳转为指定格式的时间
- Change and access of median value of listening object
- C# WebRequest POST模式 ,基于“Basic Auth”口令认证模式,使用multipart/form-data方式上传文件及提交其他数据
- com. fasterxml. jackson. databind. Exc.invalidformatexception problem
猜你喜欢

900w+ data, from 17s to 300ms, how to operate

Nce detail of softmax approximation

渤、黄海的潮汐特征

Docker install and start MySQL service
![Ansible introduction [unfinished (semi-finished products)]](/img/2a/0003daf761ba02d8837c4657fc3f29.png)
Ansible introduction [unfinished (semi-finished products)]

Unity3d RPG implementation (medium)

Limit of one question per day

FileZilla client download and installation

ffmpeg之 一张/多张图片合成视频

Summary of electromagnetic spectrum
随机推荐
[Chongqing Guangdong education] cultural and natural heritage reference materials of China University of Geosciences (Wuhan)
Converts a timestamp to a time in the specified format
机械臂速成小指南(八):运动学建模(标准DH法)
Mongodb replication set [master-slave replication]
渤、黄海的潮汐特征
[combinatorics] number of solutions of indefinite equations (number of combinations of multiple sets R | number of non negative integer solutions of indefinite equations | number of integer solutions
navicat 导出数据库的表结构
com.fasterxml.jackson.databind.exc.InvalidFormatException问题
BigVision代码
Applet get user avatar and nickname
动态规划:最长公共子串和最长公共子序列
Positioning (relative positioning, absolute positioning, fixed positioning, Z-index) 2022-2-11
Mongodb master profile
403 error displayed when vs cloning
Don't use the new Dede collection without the updated Dede plug-in
使用InputFilter限制EditText时踩坑及解决方案
解决高並發下System.currentTimeMillis卡頓
静态网页 和 动态网页的区别 & WEB1.0和WEB2.0的区别 & GET 和 POST 的区别
com. fasterxml. jackson. databind. Exc.invalidformatexception problem
Ansible introduction [unfinished (semi-finished products)]