Unable to read typings for “es6-shim” during npm install

I am following deborah kurata’s angular2 getting started course on pluralsight and installed node.js and then ran the npm install (after installing cntlm as I am behind a corporate proxy firewall). However I am receiving the following error

> product-management@1.0.0 postinstall c:UserstestDocumentsVisual Studio 2015ProjectsAngular2
> typings install

typings ERR! message Unable to read typings for “es6-shim”. You should
check the entry paths in “es6-shim.d.ts” are up to date typings ERR!
caused by Unable to connect to
https://raw.githubusercontent.com/D
efinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/es6-
shim/es6-shim.d.ts” typings ERR! caused by connect ECONNREFUSED
103.245.222.133:443

typings ERR! cwd c:UserstestDocumentsVisual Studio
2015ProjectsAngular2

typings ERR! system Windows_NT 6.1.7601 typings ERR! command
“C:Program Filesnodejsnode.exe” “c:Usersvivekba
DocumentsVisual Studio
2015ProjectsAngular2node_modulestypingsdist bin.js”
“install” typings ERR! node -v v5.10.1 typings ERR! typings -v 0.7.12

typings ERR! If you need help, you may report this error at: typings
ERR! https://github.com/typings/typings/issues

npm WARN optional Skipping failed optional dependency
/chokidar/fsevents: npm WARN notsup Not compatible with your operating
system or architecture: fseve nts@1.0.11 npm ERR! Windows_NT 6.1.7601
npm ERR! argv “C:Program Filesnodejsnode.exe” “C:Program
Filesnodejs node_modulesnpmbinnpm-cli.js” “install” npm ERR!
node v5.10.1 npm ERR! npm v3.8.3 npm ERR! code ELIFECYCLE npm ERR!
product-management@1.0.0 postinstall: typings install npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the product-management@1.0.0
postinstall script ‘typings install’. npm ERR! Make sure you have the
latest version of node.js and npm installed. npm ERR! If you do, this
is most likely a problem with the product-management 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 information
on how to open an issue for this project with: npm ERR! npm bugs
product-management npm ERR! Or if that isn’t available, you can get
their info via: npm ERR! npm owner ls product-management npm ERR!
There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:UserstestDocumentsVisual Studio
2015ProjectsAngular2npm

5
Leave a Reply

avatar
5 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jason
Guest

If you are behind a proxy you can try this (it worked for me).

Create a .typingsrc file and add the following line with your proxy info:

proxy="http://proxyname:port"

Source of my answer

Jason
Guest

The error is caused due to a connectivity issue.

Your firewall is definitely at the root of the cause.

UPDATE

Some people have solved this through setting a configuration –

npm config set proxy "http://company.com:8000"

Or

npm config set strict-ssl false

Or

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

You can check out the issue too.

SECOND UPDATE

If you’re using VS then you need to set the config from the VS developer console

  1. Open the VS developer console
  2. Set npm configurations
Jason
Guest

I solved creating .typingsrc file in the same folder, with the following content:

proxy = http://username:password@ip:port
https-proxy = http://username:password@ip:port

The words “username”, “password”, “ip” and “port” should be replaced with the values of your proxy.

Jason
Guest

I solved following the link in the Pere Page’s answer. I’ve created a .typingsrc file with these lines:

{
"proxy" : "http://myproxy:port/",
"rejectUnauthorized" : false
}

Jason
Guest

Create .typingscr file in your project folder parallel to package.json and put below line. Remember to put it in ini format not in json format.

rejectUnauthorized = false

I am using this behind corporate environment without any proxy setting and it worked for me, hope will work for you.