Search code examples
node.jsangularnpmdependencies

I Get this error when im trying to execute ng serve "An unhandled exception occurred: Cannot find module '@angular/compiler-cli'


Im Starting with Angular/cli and when I try to execute ng serve I Get this error. I've already update npm and I did cache clean --force, I've restarded my pc and all that and still not working, I've tryed executing globaly and in the directory itself and anything seems work, any help?

To highlight, after that error I was getting "Cannot find module '@angular-devkit/build-angular/package.json'" I've updated npm, reinstalled nodejs and install npm when I was passing trhough that but now I get this. I'm working in windows.

enter image description here


Solution

  • Try to install compiler in your project npm i @angular/compiler-cli --save after then ng serve