After Upgrading Angular from 8 to 10 I got ERROR in ts.updateIdentifier is not a function
Asked Answered
V

2

18

After Upgrading Angular from 8 to 10 I got

 ERROR in ts.updateIdentifier is not a function

this is my

ng --version

Angular CLI: 10.0.6
Node: 10.15.2
OS: win32 x64

Angular: 10.0.11
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: <error>

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.29
@angular-devkit/build-angular     0.803.29
@angular-devkit/build-optimizer   0.803.29
@angular-devkit/build-webpack     0.803.29
@angular-devkit/core              10.0.6
@angular-devkit/schematics        10.0.6
@angular/cdk                      10.1.3
@angular/cli                      10.0.6
@angular/fire                     5.4.2
@angular/http                     7.2.16
@ngtools/webpack                  8.3.29
@schematics/angular               10.0.6
@schematics/update                0.1000.6
rxjs                              6.6.2
typescript                        4.0.2
webpack                           4.39.2

I am using yarn , could anyone help me , I am using code-sharing native script

Virginiavirginie answered 20/8, 2020 at 19:47 Comment(0)
S
49

I ran into the same error today. You should downgrade your typescript dependency to 3.9.7. That fixed it for me.

Snaky answered 20/8, 2020 at 20:24 Comment(3)
for those like me who aren't really familiar with the commands, I used this command and it worked for me: npm install typescript@">=3.0.0 <3.9.7"Makhachkala
Also fixed it for me. the error occured during the Compiling @angular/service-worker/config : es2015 as esm2015 step of the buildColicweed
Encountered the same issue for angular 9.x. I had to downgrade to typescript 3.8.3Phrasal
A
2

Since downgrading a major language version was not really an option for me, and I by coincidence had a repository with an angular app that did not have the problem, I compared them to find this solution:

The error existed with @angular/… version 10.0.5. When I upgraded these packages to version 10.2.0, the problem was gone.

The full list for my basic app is below, but you might have more @angular/ prefixed packages:

    "@angular/animations": "^10.2.0",
    "@angular/common": "^10.2.0",
    "@angular/compiler": "^10.2.0",
    "@angular/core": "^10.2.0",
    "@angular/forms": "^10.2.0",
    "@angular/platform-browser": "^10.2.0",
    "@angular/platform-browser-dynamic": "^10.2.0",
    "@angular/router": "^10.2.0"
Andris answered 16/11, 2020 at 13:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.