2

I have woken up and opened VS Code today just like any other weekday, and to my surprise ALL of my imports now have errors.

Any import at the top of typescript pages all have red lines underneath with the error message: "Cannot find module 'module_name_here'. ts(2307)".

Even imports from @ionic/angular give errors. What has happened here and how do I resolve this? Thanks

James Slater
  • 674
  • 1
  • 9
  • 19
  • Maybe this could help? https://stackoverflow.com/questions/45903511/vs-code-cannot-find-module-angular-core-or-any-other-modules?rq=1 – CFLS Aug 16 '19 at 13:47
  • I tried all answers solutions and still have the problem :( – James Slater Aug 16 '19 at 13:59
  • a classic but worth a go: have you turned the computer off and on again? a new version of vscode came out a day or two ago so maybe that's got installed and something cached needs flushing? – rtpHarry Aug 16 '19 at 14:51
  • Tried the classic tech support tip immediately after seeing the issue, unfortunately no help. I've just tried clearing cache that didn't work either :( – James Slater Aug 16 '19 at 14:58
  • My node_modules folder seems normal, but my project must not have access to it or something as when I just tried to run 'ionic serve' I am greeted with: Looks like @angular/cli isn't installed in this project. - I have been working on this project for a good 3 months with everything working... – James Slater Aug 16 '19 at 15:00

1 Answers1

0

Seems like the node modules folder is corrupted, If the error still persists after you remove the folder, and run npm install , try and make a new project and import everything in there.