Message “npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead”

Step 1: go to the \nodejs folder and open the two files npm.cmd and npm by text editor

Enter image description here

Step 2: replace prefix -g by prefix --location=global for the line number 12 of the npm.cmd file and line number 23 of the npm file

Enter image description here

Enter image description here

Leave a Comment