Solvedangular cli ng-serve is not working - Could not find module "@angular-devkit/build-angular"
✔️Accepted Answer
@DineshChopra i've finally made this npm install @angular-devkit/build-angular
and it worked. I'm wondering it sould be within the dev deps or not ?
Other Answers:
I looked inside node_modules
and apparently only dependencies are installed, not devDependencies. With the new NPM, we need to explicitly get the devDependencies:
npm i --only=dev
I encountered this issue when use ng update
to upgrade from 5 to 6. After successfully upgraded, the app couldn't start
I remove my repo.
Create new project again ng new testapp
cd testapp
npm install
ng serve
Its working for me know, but don't know why its not working earlier. Either its a problem of angular-cli or its a problem of my system.
It waste my 3 hours. So please clarify what exactly we have to do when we face that kind of issue.
Please do below steps
- Delete node_modules and package-lock.json (if you have one)
- And npm install again.
Its will be work perfectly.
Versions
ng : 6.0.0
node : v8.9.0
npm : 6.0.0
Operating System : macOS
Repro steps
I have created new project with angular-cli.
ng new testapp
cd testapp
npm install
ng serve
ng serve is not working. I found following error
dic@dic.local [~/workspace/projects/carpool]$ ng --version
So request you to please help me to resolve that issue
Observed behavior
Desired behavior
Mention any other details that might be useful (optional)