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
In my project directory I did npm install -g @angular/[email protected]
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"
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.
- 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? :(