Angular2 quickstart npm install not working

I get the following error when I try to run npm install. as below:

npm ERR! node v0.12.12 npm ERR! npm v3.3.6 npm ERR! code ELIFECYCLE npm ERR! angular2-quickstart@1.0.0 postinstall: `typings install` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular2-quickstart@1.0.0 postinstall script 'typings ins tall'. npm ERR! This is most likely a problem with the angular2-quickstart package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! typings install npm ERR! You can get their info via: npm ERR! npm owner ls angular2-quickstart npm ERR! There is likely additional logging output above. 

How do i solve this?

+8
angular
source share
4 answers

Make sure you have the typings package typings .

npm install -g typings

Also make sure you have a typings.json file.

You can follow this tutorial from the Angular2 team.

+13
source share

Not the same error, but I had a problem with the proxy server that caused the typings install error: if you had a problem with the proxy server for npm , you will also have a problem with the proxy server for typings .

The error I was getting is:

 typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/selenium-webdriver/tags/2.44.0%2B20160317120654" typings ERR! caused by connect ECONNREFUSED 104.24.112.177:443 

I fixed this by creating a settings file for typings in my %HOMEPATH% folder:

% HOMEPATH% \. Typingsrc

 proxy=http://DOMAIN%5Cusername:password@proxy:port/ https-proxy=http://DOMAIN%5Cusername:password@proxy:port/ rejectUnauthorized=false 

See these links for more details: the first one suggests placing the .typingsrc file in the project folder, but you can use the home folder, for example npm .

+4
source share

I am behind a corporate proxy, I just tried to create a .typingsrc file with the contents below and placed in the root folder of my application

 { "proxy":"http://proxy-server:8080", "rejectUnauthorized": false } 

It finally worked.

0
source share

Make sure you do not have too old version of npm. You can see how to update here .

After you have a new version of npm, install the typing package:

 npm install -g typings 
0
source share

All Articles