npm "Invalid response body while trying to fetch". Can't install any dependencies using npm

Viewed 29

Good day everyone! I recently got this message:

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

I took care of this problem by editing the 4 necessary files (npm, npm.cmd, npx, npx.cmd). Problem is, now I can't install any dependency and I can't use npx (for example for npx create-react-app my-app).

When trying to install a dependency

Running npx

What I have tried so far:

  • npm cache clean –force
  • npm chache verify
  • Deleted the npm-cache folder under 'C:\Users\reaga\AppData\Local\
  • Completely uninstalled Nodejs and reinstalled the LTS
  • Completely uninstalled Nodejs and reinstalled the current version
  • Changed the npm-cache folder's location using npm config set cache C:\reaga\nodejs\npm-cache --global
  • Deactivated antivirus
  • Prayed to 17 different gods

On the flip side yarn seems to be working so I have no problems running yarn add express for example. Any help would be very much appreciated!

0 Answers
Related