Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An unhandled exception occurred: Could not find module "@angular-devkit/build-angular"

When running the terminal commands ng server or ng serve I'm getting this issue:

An unhandled exception occurred: Could not find module "@angular-devkit/build-angular"

like image 779
Ganesh Pabale Avatar asked Dec 02 '19 10:12

Ganesh Pabale


2 Answers

Check in your package.json to see if you have this package in your devDependencies section or not

"devDependencies": {
    "@angular-devkit/build-angular": "~0.803.18"
}

If exist try to

delete package-lock.json or yarn-lock.json

run

npm cache clean --force

then run

npm i
like image 86
Tony Ngo Avatar answered Sep 22 '22 21:09

Tony Ngo


Install @angular-devkit/build-angular as dev dependency.

npm install --save-dev @angular-devkit/build-angular

or,

yarn add @angular-devkit/build-angular --dev

like image 22
Santhosh Avatar answered Sep 19 '22 21:09

Santhosh