0

I have been spending hours trying to figure out what is wrong with trying to run an angular based project. node version: v12.16.1

  1. In my project directory I did npm install -g @angular/[email protected]

  2. Once this was done, when I typed the command ng build --prod I got the error An unhandled exception occurred: Could not find module "@angular-devkit/build-angular"

  3. then I did npm install --save-dev @angular-devkit/build-angular there is something in the installation that mentions:

"UNMET PEER DEPENDENCY @angular/compiler-cli@^8.0.0"

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN @angular-devkit/[email protected] requires a peer of @angular/compiler-cli@^8.0.0 but none was installed. npm WARN @ngtools/[email protected] requires a peer of @angular/compiler-cli@^8.0.0 but none was installed.

  1. When I ran ng build --prod again, this time I got the error below instead: An unhandled exception occurred: Cannot find module '@angular/compiler-cli'

What am I missing here? :(

1 Answer 1

0

Could not find module "@angular-devkit/build-angular" This Npm package missing for you Computer , so plz Install

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

Sign up to request clarification or add additional context in comments.

2 Comments

that is what I did in no 3. but it gave me another error in no 4. again
Sorry, i have attached 2 link , its solve your problem, github.com/npm/npm/issues/14185 github.com/npm/npm/issues/5095

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.