-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
@ngrx/effects/src/effect_creator.d.ts:12:43 - error TS2313: Type parameter 'OT' has a circular constraint. #4275
Comments
This problem was actually introduced from the latest version of typescript (5.4.2), problem does not occur on the previous major release (5.3.3) |
confirm, that tsc 5.3.3 solved the problem |
error was solved with tsc 5.3.3 but was introduced again with angular-cli 17.3.0 today |
as for me, tsc 5.3.3 works well with angular 17.3.0 |
Also for me it works well, but when |
This error also popped up after updating to angular 17.3.0 and typescript 5.4.2. |
This seems to be an issue on TypeScript's side. |
My mistake. I didn’t see that my typescript version was 5.4.2 |
This did not work for me. Runs fine in Angular v16.x.x but with Angular 17 and even typescript 5.3.3, it fails. |
Same problem with angular 17.3.1 and the latest version typescript 5.4.3. |
@timdeschryver According to Typescript microsoft/TypeScript#57750 problem was fixed in 5.4.3 but it is still happing with Angular 17.3.1 and Typescript 5.4.3 |
same v17.3.1 with v5.4.3 doesn't work, just brought back Typecript v5.3.3 |
I've been investigating this further. The downgrade of TS works on my (intel) mac. It works on Linux. It works in Github actions. Where it does not work is when building with Docker - even using the same version of node. I've tried various base images, but all lead to the same error. |
- Downgrade ts to fix the issue - ngrx/platform#4275
They released typescript 5.4.4 today but didn't fix this issue |
As far as I understand NGRX need to release a version that support typescript 5.4.3 and above. |
The fix has been released with NgRx 17.2.0 |
Thank you! That did the trick. Now builds for me everywhere, including in docker. |
## Proposed change <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that is required for this change. --> ## Related issues - 🐛 Fixes #(issue) - 🚀 Feature #(issue) There is a missmatch of versions between angular ngrx and tsc. It was fixed on ngrx 17.2 Here is the tracking issue ngrx/platform#4275 <!-- Please make sure to follow the contributing guidelines on https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
Which @ngrx/* package(s) are the source of the bug?
effects
Minimal reproduction of the bug/regression with instructions
When trying to compile code in an Nx monorepo I get the following Error:
12 }, DT extends DispatchType<C>, OT extends ObservableType<DT, OT>, R extends EffectResult<OT>>(source: () => R & ConditionallyDisallowActionCreator<DT, R>, config?: C): R & CreateEffectMetadata;
Expected behavior
It should not throw a TypeScript Error.
I have tried adding to the the following to the base tsconfig
There are, however, dozens of tsconfigs, as this is a monorepo. They mostly inherit form a base config, but not all.
I may be able to add it to one of those configs and have it work. It would be preferable that the code did not trigger TS type checking.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
Node : 18.19.1
OS : darwin-arm64
yarn : 1.22.21
nx (global) : 18.0.7
nx : 18.0.7
@nx/js : 18.1.0
@nx/jest : 18.1.0
@nx/linter : 18.1.0
@nx/eslint : 18.1.0
@nx/workspace : 18.1.0
@nx/angular : 18.1.0
@nx/cypress : 18.1.0
@nx/devkit : 18.1.0
@nx/eslint-plugin : 18.1.0
@nrwl/tao : 18.0.7
@nx/web : 18.1.0
@nx/webpack : 18.1.0
typescript : 5.4.2
Community plugins:
@ng-bootstrap/ng-bootstrap : 16.0.0
@ngrx/component-store : 17.1.1
@ngrx/effects : 17.1.1
@ngrx/entity : 17.1.1
@ngrx/router-store : 17.1.1
@ngrx/schematics : 17.1.1
@ngrx/store : 17.1.1
@ngrx/store-devtools : 17.1.1
ng-mocks : 12.5.1
The following packages should match the installed version of nx
Other information
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: