Encountering an error during npm install with angular 2 quickstart project

有些话、适合烂在心里 提交于 2019-12-11 10:43:33

问题


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


回答1:


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

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

rejectUnauthorized=false


来源:https://stackoverflow.com/questions/36471669/encountering-an-error-during-npm-install-with-angular-2-quickstart-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!