无法使用Angular CLI创建项目

时间:2018-11-09 00:38:06

标签: angular angular-cli

几天前,我使用 Angular CLI 创建了一个新项目,一切正常。我现在无法创建任何新项目。下面是cmd中的错误日志:

 c:\Users\Jesper\Desktop>ng new mytestapp
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE mytestapp/angular.json (3795 bytes)
CREATE mytestapp/package.json (1316 bytes)
CREATE mytestapp/README.md (1026 bytes)
CREATE mytestapp/tsconfig.json (408 bytes)
CREATE mytestapp/tslint.json (2837 bytes)
CREATE mytestapp/.editorconfig (245 bytes)
CREATE mytestapp/.gitignore (503 bytes)
CREATE mytestapp/src/favicon.ico (5430 bytes)
CREATE mytestapp/src/index.html (296 bytes)
CREATE mytestapp/src/main.ts (372 bytes)
CREATE mytestapp/src/polyfills.ts (3234 bytes)
CREATE mytestapp/src/test.ts (642 bytes)
CREATE mytestapp/src/styles.css (80 bytes)
CREATE mytestapp/src/browserslist (388 bytes)
CREATE mytestapp/src/karma.conf.js (964 bytes)
CREATE mytestapp/src/tsconfig.app.json (166 bytes)
CREATE mytestapp/src/tsconfig.spec.json (256 bytes)
CREATE mytestapp/src/tslint.json (314 bytes)
CREATE mytestapp/src/assets/.gitkeep (0 bytes)
CREATE mytestapp/src/environments/environment.prod.ts (51 bytes)
CREATE mytestapp/src/environments/environment.ts (662 bytes)
CREATE mytestapp/src/app/app-routing.module.ts (245 bytes)
CREATE mytestapp/src/app/app.module.ts (393 bytes)
CREATE mytestapp/src/app/app.component.html (1173 bytes)
CREATE mytestapp/src/app/app.component.spec.ts (1104 bytes)
CREATE mytestapp/src/app/app.component.ts (213 bytes)
CREATE mytestapp/src/app/app.component.css (0 bytes)
CREATE mytestapp/e2e/protractor.conf.js (752 bytes)
CREATE mytestapp/e2e/tsconfig.e2e.json (213 bytes)
CREATE mytestapp/e2e/src/app.e2e-spec.ts (305 bytes)
CREATE mytestapp/e2e/src/app.po.ts (208 bytes)
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @schematics/update@0.10.5
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of '@angular/cli'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Jesper\AppData\Roaming\npm-cache\_logs\2018-11-09T00_31_49_304Z-debug.log
Package install failed, see above.

这是ng version的输出:

Angular CLI: 7.0.4
Node: 10.13.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.10.4
@angular-devkit/core         7.0.4
@angular-devkit/schematics   7.0.4
@schematics/angular          7.0.4
@schematics/update           0.10.4
rxjs                         6.3.3
typescript                   3.1.3

这个问题怎么突然发生了,我该如何解决?

1 个答案:

答案 0 :(得分:0)

我只是遇到了类似的问题,仅在我自己的情况下,下载通函后该过程就冻结了。我将其杀死并再次运行,效果很好。