Posts

Showing posts with the label nodejs

Node NPM error: URIError: URI malformed at decodeURIComponent (native) at Url.parse

Image
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:  http://stackoverflow.com/questions/15536872/node...

Install Node.JS and npm behind a firewall / company proxy - Galen Framework

Image
Problem:  Unable to install npm behind the proxy Solution:   Similar to what we did when we installed git  http://go-gaga-over-testing.blogspot.com.au/2015/04/setup-github-within-companys-firewall.html  behind a company's firewall we shall edit the config settings for Node The best way to install npm is to install node using  the node.js installer .  npm is installed as part of node. The problem occurs when you clone the Node repository from  Github npm uses a configuration file and it can be added to via the command line npm config set ... To get packages behind a proxy npm config set strict-ssl false npm config set registry "http://registry.npmjs.org/" npm config set proxy http://"username:password"@proxy:8080 npm config set https-proxy http://proxy-server-address:8080  Update:  Try changing to npm config set registry "http s ://registry.npmjs.org/" Update: You can skip the username password and just ha...