DEV Community

OlaNeat Ayoola
OlaNeat Ayoola

Posted on

8 2

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

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

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?

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay