创建新的Angular项目时出错

时间:2018-03-02 21:39:36

标签: angular

我开始学习Angular了,我想创建一个新项目。 我已经成功安装了Angular CLI,现在我正在输入

ng new hello-world

在我的控制台中。

但我收到了这个

create hello-world/README.md (1026 bytes)


create hello-world/.angular-cli.json (1246 bytes)
create hello-world/.editorconfig (245 bytes)
create hello-world/.gitignore (544 bytes)
create hello-world/src/assets/.gitkeep (0 bytes)
create hello-world/src/environments/environment.prod.ts (51 bytes)
create hello-world/src/environments/environment.ts (387 bytes)
create hello-world/src/favicon.ico (5430 bytes)
create hello-world/src/index.html (297 bytes)
create hello-world/src/main.ts (370 bytes)
create hello-world/src/polyfills.ts (3114 bytes)
create hello-world/src/styles.css (80 bytes)
create hello-world/src/test.ts (642 bytes)
create hello-world/src/tsconfig.app.json (211 bytes)
create hello-world/src/tsconfig.spec.json (283 bytes)
create hello-world/src/typings.d.ts (104 bytes)
create hello-world/e2e/app.e2e-spec.ts (293 bytes)
create hello-world/e2e/app.po.ts (208 bytes)
create hello-world/e2e/tsconfig.e2e.json (235 bytes)
create hello-world/karma.conf.js (923 bytes)
create hello-world/package.json (1296 bytes)
create hello-world/protractor.conf.js (722 bytes)
create hello-world/tsconfig.json (363 bytes)
create hello-world/tslint.json (3012 bytes)
create hello-world/src/app/app.module.ts (316 bytes)
create hello-world/src/app/app.component.css (0 bytes)
create hello-world/src/app/app.component.html (1141 bytes)
create hello-world/src/app/app.component.spec.ts (986 bytes)
create hello-world/src/app/app.component.ts (207 bytes)
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kuba/.npm/_logs/2018-03-02T21_30_38_767Z-debug.log
Error: Package install failed, see above.
Package install failed, see above.

之前我看到的错误是

npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of 
Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/astw/-/astw-2.2.0.tgz failed, reason: socket hang up
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kuba/.npm/_logs/2018-03-02T21_08_04_012Z-debug.log
Error: Package install failed, see above.
Package install failed, see above.

这就是我输入

的原因
MacBook-Pro-Kuba:github kuba$ npm config set proxy http://proxy.company.com:8080
MacBook-Pro-Kuba:github kuba$ npm config set https-proxy http://proxy.company.com:8080

但那并没有解决我的问题:( 有人可以问我吗? 还清除了npm缓存。

MacBook-Pro-Kuba:github kuba$ node -v
v8.2.1
MacBook-Pro-Kuba:github kuba$ npm -v
5.3.0

谢谢,

库巴

0 个答案:

没有答案