Node NPM error: URIError: URI malformed at decodeURIComponent (native) at Url.parse
Problem: If you are using node and accidentally change your proxy settings every time you run npm you get something like this:
NPM error: URIError: URI malformed at decodeURIComponent (native) at Url.parse
What Happened there?
Once a bad URL makes it in to the config file, it is broken, but you as the operator are unaware until you do another operation. This was confusing when I was setting both HTTP and HTTPS proxies. It delayed me from finding the real problem. To resolve this issue it would be great if the URLs were validated before they went in the file. This would reduce confusion.
How to solve this?
- You cannot reset npm config from command-line because the npm command doesn't work anymore
- Reinstalling node will not help
- Locate where npm has its global settings stored: C:\Users\Ady\.npmrc
- edit the file and everything is back to normal!
This solves a similar but different problem:
Comments
Post a Comment