Skip to content

Compilation error after upgrading Angular 7 to 13 #23586

@kissy0205

Description

@kissy0205

Hi,

I've followed this official document to upgrade my Angular v.7.x to v13.x. Successfully updated. but when doing ng serve, getting below issues. I don't understand the problem even after going through some technical documentation. I need someone to help me on this

ERROR - 1

Generating browser application bundles (phase: setup)...(node:8132) UnhandledPromiseRejectionWarning:
Error: The target entry-point "@this-is-custom-library/built-with-older-angular-version" has missing dependencies:

  • @angular/forms/src/directives/control_value_accessor
  • @angular/core/src/type

tsConfig.json

{
  "extends": "./node_modules/@this-is-custom-library/built-with-older-angular-version/config/tsconfig.base",
  "compilerOptions": {
    "importHelpers": true,
    "outDir": "dist",
    "strictPropertyInitialization": false,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "module": "es2015",
    "baseUrl": "src",
    "skipLibCheck": true
  },
  "angularCompilerOptions": {
    "preserveWhitespaces": "true"
  },
}

when i remove the "extends": "./node_modules/@this-is-custom-library/built-with-older-angular-version/config/tsconfig.base", from tsConfig.json, its compiled and throwing some other error like below.

ERROR- 2

 src/app/appComponent.ts:2:58 - error TS2792: Cannot find module '@angular/router'. Did you mean to set the 'moduleResolution' option to 'node', 
 or to add aliases to the 'paths' option?
2 import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';

Could someone please help me to understand the issue and share solution for fixing issues?

Thanks Team
~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions