0

I created a project following all the instructions in the Angular CLI website, but when I try to build the project it gave an error like this:

this

Same project I build using npm start command after npm install

  • Please advise whether this a good approach or not
  • If I want to use CLI how can I fix it?
  • Is installing a node module inside the project good or bad?
2
  • 1
    You should install cli globally. npm install -g @angular/cli ... then create the project. Commented Jun 1, 2017 at 18:10
  • Thanks @Ludwig solution worked Commented Jun 1, 2017 at 18:30

4 Answers 4

1

as per error message your using older version try below commands

npm uninstall -g angular-cli
npm cache clean
npm install -g @angular/cli@latest
Sign up to request clarification or add additional context in comments.

Comments

0

angular-cli has been depreciated you just have to reinstall @angular/cli

1- npm uninstall --save-dev angular-cli
2- npm install @angular/cli --save-dev

to use it globally install

1- npm install @angular/cli -g

Also if you are considering Angular Ahead-of-Time, install

npm install --save-dev @ngtools/webpack

Comments

0

Because angular commands has been changed. Just type : npm install -g @angular/cli And then it'll download/install it in your angularjs folder.

Set the cmd path to your AJS2 folder to make it working. :)

Comments

0

I faced the same issue. reinstalled nodejs. This fixed the issue

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.