当前位置:网站首页>npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.

npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.

2022-08-10 20:57:00 Front end Jia Gongzi

Solution 1: Modify the configuration file:

1.1 can use the command line.Find the npm configuration directory:

npm config command

npm config lsnpm config listnpm config ls -l

1.2 Open the nodejs folder.and open two files npm.cmd and npm

1.3 Find the prefix -g in the two files and replace it with prefix --location=global

prefix --location=global

Before modification:

After modification:

原网站

版权声明
本文为[Front end Jia Gongzi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208102027581533.html