Angular cant make new project

326 Views Asked by At

I tried making the new project using AngularCLI like this:

ng new my-app-dream

and it resulted in:

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning UNABLE_TO_VERIFY_LEAF_SIGNATURE: request to https://registry.npmjs.org/@angular-devkit%2fbuild-angular failed, reason: unable to verify the first certificate
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @angular/core@^6.1.0
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 'my-app-dream'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!    %appdata%\npm-cache\_logs\2018-09-28T06_46_24_071Z-debug.log
Package install failed, see above.
2

There are 2 best solutions below

1
On

Run npm install -g @angular/cli

0
On

can you open a terminal and do

cat %appdata%\Roaming\npm-cache\_logs\2018-09-28T06_46_24_071Z-debug.log

then post the results?

Since it's complaining that it can't find a matching version for @angular/core, maybe you don't have angular installed correctly, perhaps you can try to reinstall the angular CLI using the following command and trying again.

npm install -g @angular/cli

Hope it helps :)