angularjs 在ng新项目上获取“npm ERR!code ENOVERSIONS”

kxeu7u2r  于 7个月前  发布在  Angular
关注(0)|答案(1)|浏览(164)

每当我启动任何有Angular 的新项目时,我都会得到这个错误。

npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for timed-out

字符串

例如:-

ng new training-app
    installing ng2
      create .editorconfig
      create README.md
      create src\app\app.component.css
      create src\app\app.component.html
      create src\app\app.component.spec.ts
      create src\app\app.component.ts
      create src\app\app.module.ts
      create src\assets\.gitkeep
      create src\environments\environment.prod.ts
      create src\environments\environment.ts
      create src\favicon.ico
      create src\index.html
      create src\main.ts
      create src\polyfills.ts
      create src\styles.css
      create src\test.ts
      create src\tsconfig.json
      create angular-cli.json
      create e2e\app.e2e-spec.ts
      create e2e\app.po.ts
      create e2e\tsconfig.json
      create .gitignore
      create karma.conf.js
      create package.json
      create protractor.conf.js
      create tslint.json
    Successfully initialized git.
    Installing packages for tooling via npm.
    npm WARN deprecated [email protected]: angular-cli has been renamed to @angular/cli. Please update your dependencies.
    npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm ERR! code ENOVERSIONS
    npm ERR! No valid versions available for timed-out

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Yaso\AppData\Roaming\npm-cache\_logs\2018-01-06T19_29_46_895Z-debug.log

    Package install failed, see above.

我一直在努力

我已经尝试更新npm使用

npm install npm@next -g


但仍然没有得到相同的问题,相同的issues on git

vfwfrxfs

vfwfrxfs1#

我遇到了同样的问题,然后我为它配置了注册表。尝试运行此命令。“npm config set registry https://registry.npmjs.org/

相关问题