Cannot find module '@angular/core' or its corresponding type declarations

olaneat

OlaNeat Ayoola

Posted on June 23, 2022

Cannot find module '@angular/core' or its corresponding type declarations

i recently updated my project angular version from v11 to v14 the other version worked, but this version 14 isnt working, anytime i start the server, i get the following error

./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Cannot resolve type entity i0.ApplicationModule to symbol
    at /home/olaneat/Desktop/files/project/angular/jobConnect/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Cannot resolve type entity i0.ApplicationModule to symbol
    at /home/olaneat/Desktop/files/project/angular/jobConnect/node_modules/@ngtools/webpack/src/ivy/loader.js:81:18
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Error: node_modules/@angular/animations/browser/index.d.ts:12:21 - error TS2307: Cannot find module '@angular/core' or its corresponding type declarations.

12 import * as i0 from '@angular/core';
Enter fullscreen mode Exit fullscreen mode

i've cleared my cache, deleted the node_module folder & did the following, still non worked


npm i
ng update
npm i @angular/core

💖 💪 🙅 🚩
olaneat
OlaNeat Ayoola

Posted on June 23, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related