Salwa
Salwa

Reputation: 91

npm installation error CLI

I tried to install npm and run angular project but there is a warning

enter image description here

I ran this command npm install -g @angular/cli after installing git and node

Upvotes: 1

Views: 98

Answers (3)

rbashish
rbashish

Reputation: 2153

You are here:

C:\xampp\htdocs\angular>npm install

instead use:

C:\xampp\htdocs\angular>ng new myangular-app

When you do this it will create and download all the required files and dependencies. After this you are good to go then.

enter image description here

Hope this helps!

PS: Please have patience, as this can take some time to set up your new project. (It will download all the required files and dependencies to node_modules folder).

Upvotes: 0

Shrivats
Shrivats

Reputation: 53

You need to have package.json file using which npm downloads dependencies for the project. Create a new project with the following command ng new projectName.

Upvotes: 0

Nikola Kirincic
Nikola Kirincic

Reputation: 3757

you are missing package.json from your project. Since you have installed angular/cli globally, you should just create new project as ng new nameofproject

See here for more info https://github.com/angular/angular-cli

Upvotes: 1

Related Questions