使用 angular 2 quickstart 项目进行 npm 安装时遇到错误

Encountering an error during npm install with angular 2 quickstart project

我在尝试为此存储库安装依赖项时遇到问题。

它发生在尝试 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 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

现在我在代理后面,所以我认为这一定是资源因某种原因被阻止的问题。

我实际上可以在浏览器中导航到上述错误中引用的 url,并且 github 页面打开得很好。

在网上搜索时,我发现了一些帖子,其中包含有关如何将代理设置添加到 npm 配置文件的说明。我知道代理详细信息,所以我现在有:

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

这对我没有影响,所以我不确定下一步该怎么做。

谁能给点建议?

谢谢

您还应该创建一个包含以下内容的 .typingsrc 文件:

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

rejectUnauthorized=false