当前位置:网站首页>PM's alarm: "NPM warn config global --global, --local are deprecated
PM's alarm: "NPM warn config global --global, --local are deprecated
2022-07-24 11:57:00 【Passing cat 2022】
npm Alarm of :“npm WARN config global --global, --local are deprecated. Use --location=global instead”
Recently will windows Under the node Upgrade to 16.x after , Use npm The command reports this prompt .
use where Command a search , Found in C:\Program Files\nodejs\ Below directory , Yes npm.cmd, The contents are as follows
:: Created by npm, please don't edit manually.
@ECHO OFF
SETLOCAL
SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
)
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (
SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%"
)
"%NODE_EXE%" "%NPX_CLI_JS%" %*
In the middle FOR /F “delims=” %%F IN (‘CALL “%NODE_EXE%” “%NPM_CLI_JS%” prefix -g’) DO ( There is one prefix -g, This is the place . Change these to –location=global
Use the text editor , Save after modification , Copy the past ( The reason for saving , In general , The editor does not run as an administrator , In this case , It cannot be saved directly to this directory )
In addition to this , One more. npx.cmd It's also revised , That's all right. . Problem solving .
边栏推荐
- A* and JPS
- The art of management - driving software R & D efficiency through leadership
- [QNX Hypervisor 2.2用户手册]9.2 cmdline
- Record a garbage collection and analysis of gceasy
- Easy to use example
- The difference between synchronized and lock locks
- Why is the datetime type field 8 hours earlier when I use flinkcdc to read MySQL's binlog?
- Microservice - eruka
- Mysql database
- 一周精彩内容分享(第13期)
猜你喜欢

4*4图片权重的收敛规则

Dynamic memory management

源码分析Sentry用户行为记录实现过程
什么是云原生,云原生技术为什么这么火?

1184. 公交站间的距离 : 简单模拟题

NFT digital collection system construction - app development

6k+ star, a deep learning code base for Xiaobai! One line of code implements all attention mechanisms!

Share the typora tool

Two important laws about parallelism

L1-059 敲笨钟
随机推荐
Dry goods sharing - taking over a new data team as a lead - Problem Inventory and insights findings
MySQL creates partition tables and automatically partitions them by day
Guys, do you need to configure anything to use rocksdb when using flinksql? Or do you need any jar packages
Grep actually uses ps/netstat/sort
Use and expansion of fault tolerance and fusing
Judge whether a group of cards can become shunzi (the size of the king is 14,15)
String - 541. Reverse string II
Why is the datetime type field 8 hours earlier when I use flinkcdc to read MySQL's binlog?
[I also want to brush through leetcode] 468. Verify the IP address
L1-059 敲笨钟
Makefile quick use
What is cloud native? Why is cloud native technology so popular?
在kuborad图形化界面中,操作Kubernetes 集群,实现mysql中的主从复制
Jackson parsing JSON detailed tutorial
Day5: construct program logic
Day3: branch structure
One of his birds sold for 60million -- the collection of eight mountain people in the Ming and Qing Dynasties
The third day of hcip mGRE experiment
CCF 201803_ 1 jump jump
Cgo+gsoap+onvif learning summary: 9. Go and C conduct socket communication and onvif protocol processing