DEV Community

OlaNeat Ayoola
OlaNeat Ayoola

Posted on

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

Top comments (2)

Collapse
 
itsmuskanagarwal profile image
Muskan

Try "npm ls" it will show conflicting dependencies, resolve those. It worked for me.

Collapse
 
vantigranyan profile image
Van Tigranyan

Any luck here @olaneat?