Harsha Javalkar
Harsha Javalkar

Reputation: 104

An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json' Require stack

ng serve Response: An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json' Require stack:

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

Response:

npm WARN reify please re-try this operation once it completes
npm WARN reify so that the damage can be corrected, or perform
npm WARN reify a fresh install with no lockfile if the problem persists.
npm WARN reify invalid or damaged lockfile detected
npm WARN reify please re-try this operation once it completes
npm WARN reify so that the damage can be corrected, or perform
npm WARN reify a fresh install with no lockfile if the problem persists.
npm WARN reify invalid or damaged lockfile detected
npm WARN reify please re-try this operation once it completes
npm WARN reify so that the damage can be corrected, or perform
npm WARN reify a fresh install with no lockfile if the problem persists.```


Any Solution to solve. Let me know.

Upvotes: 0

Views: 3824

Answers (1)

James Wong
James Wong

Reputation: 4619

Just ran into this, my installation was interrupted midway and some packages were corrupted as a result.

The solution is pretty straightforward. Just delete the node_modules folder and the file package-lock.json then re-install the modules. The full command should be:

rm -rf node_modules
rm package-lock.json
npm install --save-dev @angular-devkit/build-angular

Upvotes: 5

Related Questions