I tried to install angular cli 9
npm i -g @angular/[email protected]
and run
 ng new some-project
I get this error:
 PS C:> ng new ng9
internal/modules/cjs/loader.js:797
    throw err;
    ^
Error: Cannot find module '@angular-devkit/core'
Require stack:
- C:\Users\\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
I finally succeeded by installing locally:
npm init
npm i  @angular/[email protected]
ng new
At the time of this answer, you can generate a new Angular 9 project by adding the next tag to your npm install command.
Open the terminal on Linux/macOS or command prompt in Windows and run:
npm install --global @angular/cli@next
You can also use npx to invoke the Angular CLI directly from npm:
npx -p @angular/cli@next ng new project-name
See this tutorial for getting started with Angular 9.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With