首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >angular2快速入门npm安装失败

angular2快速入门npm安装失败
EN

Stack Overflow用户
提问于 2016-03-29 13:57:57
回答 4查看 6.4K关注 0票数 10

当我尝试运行- npm install时,我得到了以下错误。错误信息如下:

代码语言:javascript
复制
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.

我该如何解决这个问题?

EN

回答 4

Stack Overflow用户

发布于 2016-03-29 14:06:20

确保您已经安装了typings包。

npm install -g typings

还要确保您有可用的typings.json文件。

你可以关注Angular2团队的这个tutorial

票数 13
EN

Stack Overflow用户

发布于 2016-07-20 14:11:40

不是相同的错误,但我有一个代理问题,它导致typings install失败:如果npm有代理问题,那么typings也会有代理问题。

我得到的错误是:

代码语言:javascript
复制
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

我在我的%HOMEPATH%文件夹中为typings创建了一个设置文件,修复了这个问题:

%HOMEPATH%.typingsrc

代码语言:javascript
复制
proxy=http://DOMAIN%5Cusername:password@proxy:port/
https-proxy=http://DOMAIN%5Cusername:password@proxy:port/
rejectUnauthorized=false

有关更多详细信息,请参阅以下链接:第一个链接建议将.typingsrc文件放在项目文件夹中,但您也可以使用npm等主文件夹。

票数 4
EN

Stack Overflow用户

发布于 2016-10-14 06:29:56

我是企业代理的幕后推手,我刚刚尝试用下面的内容创建一个文件.typingsrc,并将其放在我的应用程序的根文件夹中

代码语言:javascript
复制
{
"proxy":"http://proxy-server:8080",
"rejectUnauthorized": false
}

它终于成功了..

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36276516

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档