Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular project does not compile with typescript > 5.4.0 #19905

Open
1 task done
hillin opened this issue May 22, 2024 · 2 comments
Open
1 task done

Angular project does not compile with typescript > 5.4.0 #19905

hillin opened this issue May 22, 2024 · 2 comments

Comments

@hillin
Copy link

hillin commented May 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description

When upgrading to typesript ~5.4.0 (5.4.5 to be exact), the abp angular project does not compile:

X [ERROR] TS2589: Type instantiation is excessively deep and possibly infinite. [plugin angular-compiler]

    node_modules/ts-toolbelt/out/index.d.ts:3892:11:
      3892 │         0: __Assign<Merge<Os[Pos<I>], O, depth, style, noMerge>,...
           ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS2321: Excessive stack depth comparing types 'Merge<Os[Pos<I>], O, depth, style, noMerge>' and 'object'. [plugin angular-compiler]

    node_modules/ts-toolbelt/out/index.d.ts:3892:20:
      3892 │ ... __Assign<Merge<Os[Pos<I>], O, depth, style, noMerge>, Os, de...
           ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS2589: Type instantiation is excessively deep and possibly infinite. [plugin angular-compiler]

    node_modules/ts-toolbelt/out/index.d.ts:4544:11:
      4544 │         0: __MergeAll<Merge<O, Os[Pos<I>], depth, style, noMerge...
           ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS2321: Excessive stack depth comparing types 'Merge<O, Os[Pos<I>], depth, style, noMerge>' and 'object'. [plugin angular-compiler]

    node_modules/ts-toolbelt/out/index.d.ts:4544:22:
      4544 │ ..._MergeAll<Merge<O, Os[Pos<I>], depth, style, noMerge>, Os, de...
           ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS2589: Type instantiation is excessively deep and possibly infinite. [plugin angular-compiler]

    node_modules/ts-toolbelt/out/index.d.ts:4736:11:
      4736 │         0: __PatchAll<Patch<O, Os[Pos<I>], depth, style, noMerge...
           ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


X [ERROR] TS2321: Excessive stack depth comparing types 'Patch<O, Os[Pos<I>], depth, style, noMerge>' and 'object'. [plugin angular-compiler]

    node_modules/ts-toolbelt/out/index.d.ts:4736:22:
      4736 │ ..._PatchAll<Patch<O, Os[Pos<I>], depth, style, noMerge>, Os, de...
           ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I thinks this is because @abp/ng.core referenced an ancient version of ts-toolbelt which does not work with the new typescript compiler any more.

Reproduction Steps

  • Create an ABP Angular project
  • Upgrade typescript to 5.4.0
  • ng serve

Expected behavior

Build correctly.

Actual behavior

Build fails.

Regression?

No response

Known Workarounds

No response

Version

8.1.3

User Interface

Angular

Database Provider

None/Others

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

@hillin hillin added the bug label May 22, 2024
@hillin hillin changed the title Angular does not compille with typescript > 5.4.0 Angular project does not compile with typescript > 5.4.0 May 22, 2024
@sumeyyeKurtulus
Copy link
Contributor

Hello @hillin may I ask whether you have a specific reason to upgrade the typescript version to 5.4.0? Because, abp 8.1.3 supports 17.1.0 for angular that is compatible with ts 5.3.0. Currently, the library ts-toolbelt is not compatible with that typescript version and this will be fixed for the abp version 8.3.0.

@hillin
Copy link
Author

hillin commented May 24, 2024

Hi! It's because we are trying to upgrade to Angular 18(rc3), which requires Typescript 5.4+. It's just an experiment and we can definitely wait for ABP 8.3.

@masumulu28 masumulu28 removed the bug label May 24, 2024
@sumeyyeKurtulus sumeyyeKurtulus added hold Taken progress, but needs to wait something. in-progress and removed in-progress hold Taken progress, but needs to wait something. labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants