angular2 quickstart npm安装失败
当我尝试运行-npm install时出现以下错误。 错误如下:
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.
我如何解决这个问题?
确保你已经安装了typings
包。
npm install -g typings
还要确保你有typings.json
文件可用。
您可以从Angular2团队中按照本教程进行操作。
不是一样的错误,但我有一个代理问题,导致typestypings install
失败:如果你有一个代理问题的npm
那么你也将有types的代理问题。
我得到的错误是:
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%
文件夹中创buildtypes设置文件来解决此问题:
%HOMEPATH%\。typingsrc
proxy=http://DOMAIN%5Cusername:password@proxy:port/ https-proxy=http://DOMAIN%5Cusername:password@proxy:port/ rejectUnauthorized=false
看到这些链接的更多细节:第一个build议把.typingsrc
文件放到你的项目文件夹中,但是你可以使用像npm
这样的home文件夹。
- https://github.com/typings/typings/issues/106
- 在企业代理.pac后面使用npm
我背后的公司代理,我刚刚尝试创build一个文件.typingsrc与下面的内容,并放在我的应用程序的根文件夹
{ "proxy":"http://proxy-server:8080", "rejectUnauthorized": false }
它终于工作了..
确保你没有太旧的npm版本。 你可以看到如何在这里升级。
在你有一个新的npm版本之后,安装打字包:
npm install -g typings
- Angular 2路由器:不能匹配任何路由
- 如何使用Web套接字和angular度CLI来设置代理
- 你仍然可以使用PHP作为后端angularjs2没有nodejs实时应用程序?
- (Angularjs)Web应用程序的集成testing
- ExpressJs与Angular2项目的文件结构
- 将页面的几个元素存储到JSON对象
- 如何使用Mongoose,Express,Angular 4和NodeJS上传/保存和显示图片
- Angular 2获取错误** CALL_AND_RETRY_LAST分配失败 – 使用npm run start时,JavaScript堆内存不足**
- 什么阻止我的AngularJs 2应用程序运行检查器中显示的命令?