-1

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

1 Answers1

0
  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)
tumpa02
  • 36
  • 1
  • It is still not working. npm ERR! code ENOTFOUND npm ERR! syscall getaddrinfo npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' – Drishti Saraf Aug 02 '22 at 18:07