Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm Unable to Install angular-cli

I am trying to install angular-cli via npm. I have the recent version of Nodejs and git installed. I am not behind any proxy server(verified it through netsh winhttp show proxy as well as through Internet Explorer LAN settings) and there is no problem with my internet connection. When i try to run

npm install -g angular-cli then I get the following error

C:\Windows\system32>npm install -g angular-cli
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v7.3.0
npm ERR! npm  v3.10.10
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT 151.101.192.162:80
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
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'

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Windows\system32\npm-debug.log

I tried cleaning the cache through npm cache clean and also tried to change the registry to http:\ via

npm config set registry http://registry.npmjs.org/

I also tried uninstalling nodejs and reinstalling it again but it is not working. I am getting the same error. Any ideas.

like image 905
Ram Chandran Avatar asked Jul 02 '26 22:07

Ram Chandran


1 Answers

Setp-1: open windows command prompt then type following command to get the IP address of your proxy server

ping your-proxy-name

For example:

ping myproxy.xyz.com

Step-2: open Node.js command prompt and type following command

npm config set http-proxy http://your-proxy-ip-retrieved-in-step-1:port
npm config set https-proxy http://your-proxy-ip-retrieved-in-step-1:port

For example:

npm config set http-proxy http://192.168.192.95:8080
npm config set https-proxy http://192.168.192.95:8080

Setp-3: on Node.js command prompt type following command to install angular

npm install -g @angular/cli

Hope it will work for you.

like image 162
Brijesh Kumar Tripathi Avatar answered Jul 04 '26 17:07

Brijesh Kumar Tripathi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!