Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create angular 9 project?

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
like image 539
yantrab Avatar asked Oct 26 '25 19:10

yantrab


2 Answers

I finally succeeded by installing locally:

npm init
npm i  @angular/[email protected]
ng new
like image 113
yantrab Avatar answered Oct 28 '25 09:10

yantrab


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.

like image 33
Farid Rajab Avatar answered Oct 28 '25 10:10

Farid Rajab