Cannot find module '@angular/cdk/dialog' - Angular upgrade v13 to v14 issue

Discussão em 'Angular' iniciado por Dwight, Junho 10, 2025.

  1. Dwight

    Dwight Guest

    I upgraded Angular from v13 to v14

    ng update @angular/core@14 @angular/cli@14

    ng update @angular/material@14


    Getting this error after upgrade :

    ./node_modules/@angular/material/fesm2015/dialog.mjs:1:0-93 - Error: Module not found: Error: Package path ./dialog is not exported from package D:\projectName\node_modules\@angular\cdk (see exports field in D:\projectName\node_modules\@angular\cdk\package.json)

    Error: node_modules/@angular/material/dialog/index.d.ts:3:36 - error TS2307: Cannot find module '@angular/cdk/dialog' or its corresponding type declarations.

    3 import { CdkDialogContainer } from '@angular/cdk/dialog';


    This is my package.json :

    "dependencies": {
    "@angular/animations": "^14.0.1",
    "@angular/cdk": "^14.0.1",
    "@angular/common": "^14.0.1",
    "@angular/compiler": "^14.0.1",
    "@angular/core": "^14.0.1",
    "@angular/forms": "^14.0.1",
    "@angular/material": "^14.0.1",
    "@angular/platform-browser": "^14.0.1",
    "@angular/platform-browser-dynamic": "^14.0.1",


    I'm not sure what I'm doing wrong, will appreciate any help.

    Continue reading...

Compartilhe esta Página