Article directory
1. Problem background
When using the npm -v command, the following error is prompted npm WARN config global
–global ,
–local are deprecated. Use
–location=global instead
2. Cause of the problem
npm's global configuration --global
, --local
deprecated. Substitution is required --location=global
.
3. Problem handling
1. Find the installation path of node
If you forget the installation path, you can enter it in the cmd window where node
to view the path.
2. Modify npm, npm.cmd file
Modify the file prefix -g
and prefix --location=global
view it with npm -v after the modification is completed.