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

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

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?

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more