Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade angular 7 to 8, ERROR: this.typeChecker.getTypeArguments is not a function on Build Library

After upgrade my complex project based on this Guide:

When I build my library I got this error:

Building Angular Package

------------------------------------------------------------------------------
Building entry point 'my-library'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
ERROR: this.typeChecker.getTypeArguments is not a function
An unhandled exception occurred: this.typeChecker.getTypeArguments is not a function
See "XXXXXX\angular-errors.log" for further details.

I update Node.js, Typescript and Ancular.Cli Globally

All steps done successfully.

Should I do something to upgrade my Library separately?

Update:

To build i use this command ng build my-library-name with this package ng-packagr": "^5.4.0

All library are in one project, and project upgrade with ng update

Node Version: 12.14.1, Typescript version: 3.4.5

like image 883
Masoud Bimmer Avatar asked Jan 14 '20 10:01

Masoud Bimmer


1 Answers

I find an issue in tsickle repository Here.

Based on this issue, angular library raised error when tsickle 0.38.0 installed.

Issue available here.

New version of tsickle (0.36.0) gives an error trying to build a library using ng build. Works fine with previous version( 0.35.0)

I revert the tsickle to version 0.35.0, and error gone.

like image 169
Masoud Bimmer Avatar answered Sep 18 '22 16:09

Masoud Bimmer