npm WARN config global –global, –local are deprecated. Use –location=global instead.

This seemed to solve the issue for me:

  1. Go to folder C:\Program Files\nodejs
  2. You have to edit four files named npm, npm.cmd, npx, npx.cmd
  3. Open the files in a text editor, like Visual Studio Code
  4. Replace prefix -g with prefix –location=global in all four files
  5. Save all (if asked, save as administrator)
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments