当前位置:网站首页>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.
边栏推荐
猜你喜欢
![[Chongqing Guangdong education] cultural and natural heritage reference materials of China University of Geosciences (Wuhan)](/img/19/815e7cba81f6eb52db5ef0db556dfd.jpg)
[Chongqing Guangdong education] cultural and natural heritage reference materials of China University of Geosciences (Wuhan)

Nanning water leakage detection: warmly congratulate Guangxi Zhongshui on winning the first famous brand in Guangxi

Makefile demo

Latest version of NPM: the "NPM" item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check

Introduction to mongodb

小程序获取用户头像和昵称

On the adjacency matrix and adjacency table of graph storage

MySQL MAC download and installation tutorial

PAT乙级“1104 天长地久”DFS优化思路

Nce detail of softmax approximation
随机推荐
softmax的近似之NCE详解
使用InputFilter限制EditText时踩坑及解决方案
Vs 2019 configuration tensorrt
ffmpeg之 一张/多张图片合成视频
FileZilla Client下載安裝
Model transformation onnx2engine
The calculation of stripe, kernel and padding in CNN
Elsevier latex submitted the article pdftex def Error: File `thumbnails/cas-email. jpeg‘ not found: using draf
[embedded module] OLED display module
New programmers use the isXXX form to define Boolean types in the morning, and are discouraged in the afternoon?
Docker install and start MySQL service
TCP/IP模型中的重磅嘉宾TCP--尚文网络奎哥
The XML file generated by labelimg is converted to VOC format
Ansible简介【暂未完成(半成品)】
Tidal characteristics of the Bohai Sea and the Yellow Sea
Avec trois. JS fait une scène 3D simple
Solve high and send system Currenttimemillis Caton
redis高级应用【密码防护、数据持久化、主从同步、哨兵模式、事务】【暂未完成(半成品)】
MongoDB安装 & 部署
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