当前位置:网站首页>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 -y
You 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-miniprogram
Continue to cmd Enter the next command in the window ,
OK.
边栏推荐
- Avec trois. JS fait une scène 3D simple
- umi 路由拦截(简单粗暴)
- sigaction的使用
- 动态规划:最长回文子串和子序列
- 简易版 微信小程序开发之for指令、上传图片及展示效果优化
- MongoDB基本操作【增、删、改、查】
- Applet get user avatar and nickname
- Some preliminary preparations for QQ applet development: make an appointment for a development account, download and install developer tools, and create QQ applet
- Table structure of Navicat export database
- VS克隆时显示403错误
猜你喜欢
Use three JS make a simple 3D scene
用Three.js做一个简单的3D场景
Pat class B "1104 forever" DFS optimization idea
js中#号的作用
Vs 2019 configure tensorrt to generate engine
Tidal characteristics of the Bohai Sea and the Yellow Sea
Limit of one question per day
Captura下载安装及在Captura配置FFmpeg
Pytorch轻量级可视化工具wandb(local)
机械臂速成小指南(八):运动学建模(标准DH法)
随机推荐
Pytoch lightweight visualization tool wandb (local)
Why does thread crash not cause JVM crash
Model transformation onnx2engine
Unity3d RPG implementation (medium)
node 开启服务器
Pat class B common function Usage Summary
程序员新人上午使用 isXxx 形式定义布尔类型,下午就被劝退?
PAT乙级常用函数用法总结
C # webrequest post mode, based on "basic auth" password authentication mode, uploads files and submits other data using multipart / form data mode
Bid farewell to artificial mental retardation: Mengzi open source project team received RMB 100 million financing to help NLP develop
简易版 微信小程序开发之页面跳转、数据绑定、获取用户信息、获取用户位置信息
The calculation of stripe, kernel and padding in CNN
Nce detail of softmax approximation
Applet (continuous update)
900w+ data, from 17s to 300ms, how to operate
Summary of determinant knowledge points in Chapter 1 of Linear Algebra (Jeff's self perception)
900W+ 数据,从 17s 到 300ms,如何操作
The idea setting code is in UTF-8 idea Properties configuration file Chinese garbled
渤、黄海的潮汐特征
ffmpeg下载安装教程及介绍