简体   繁体   中英

Encountering an error during npm install with angular 2 quickstart project

I'm encountering an issue when attempting to install the dependencies for this repo.

It happens during the postinstall script when attempting the typings install command

The output I see is:

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 unable to get local issuer certificate

typings ERR! cwd C:\Users\rparker\Documents\GitHub\angular2-seed
typings ERR! system Windows_NT 6.1.7601
typings ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\rpa
rker\\Documents\\GitHub\\angular2-seed\\node_modules\\typings\\dist\\bin.js" "in
stall"
typings ERR! node -v v4.4.1
typings ERR! typings -v 0.7.12

Now I am behind a proxy, so was thinking it must be an issue with the resource being blocked for some reason.

I can actually navigate to the url referenced in the error above in a browser and the github page opens up just fine.

Digging around the web I have come across posts with instructions on how to add proxy settings to the npm config file. I know the proxy details, so in mine I now have:

ca=
strict-ssl=false
registry=http://registry.npmjs.org/
proxy=http://myusername:mypassword@proxydomain:proxyport
https-proxy=http://myusername:mypassword@proxydomain:proxyport

This has made no difference for me, so I'm unsure what to do next.

Can anyone offer any advice?

Thanks

You should also create a .typingsrc file containing the following content:

proxy=http://myusername:mypassword@proxydomain:proxyport

rejectUnauthorized=false

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM