angularjsnode.jsnpmgit-bash

Getting “npm ERR! code ENOVERSIONS” on ng new project


Whenever I am lanching any angular new prject I am getting this error.


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

For example:-

     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 angular-cli@1.0.0-beta.28.3: angular-cli has been renamed to @angular/cli. Please update your dependencies.
    npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
    npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
    npm WARN deprecated minimatch@2.0.10: 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.

What I have tried so far

I have tried updating npm using

npm install npm@next -g

but no still getting same problem, same issues on git


Solution

  • I had same issue then I configured the registry for it. Try to run this command. " npm config set registry https://registry.npmjs.org/ "