-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Type alias 'ExcludeFromTuple' circularly references itself. #2462
Comments
Which TypeScript version are you using? |
I am getting the same error when upgrading existig application from redux core to RTK ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/utils.d.ts:12:127 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/utils.d.ts:13:130 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/utils.d.ts:14:128 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/utils.d.ts:15:131 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:43:21 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:45:5 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:46:5 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:46:32 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:47:14 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:47:135 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:47:152 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:48:103 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:48:186 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:48:222 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/getDefaultMiddleware.d.ts:26:36 ERROR in [at-loader] ./node_modules/@reduxjs/toolkit/dist/getDefaultMiddleware.d.ts:44:34 |
The typescript version is 4.3 |
It works in RTK 1.7.0 wihtout any issues |
We made changes to the types of Just listing errors isn't going to help us debug or understand what's going on, though. At a minimum, we'd need to see an actual repo or CodeSandbox that shows this happening, including the Given that this works fine for our other users so far, it's most likely an issue with your build setup or config somehow. |
The error messages are pretty bogus, Do you maybe have multiple versions of RTK installed in your project side-by-side? |
Not sure how this works with previous version. I will re assess my tsconfig.json once again to see any errors in my build steps. |
Will it be helpful if I share my build steps and tsconfig files ? |
@Ramchandirane : yes, like I said above, it would really help if you could share an actual repo+project that demonstrates this happening |
Sure will get back to you on this. We are not having public repo's. I will figure out a way to set a bolier plate code, like what I have in my current project and share it with the error occurance. |
This definitely sounds like a TypeScript versioning issue to me. Rest elements can be at any position in a tuple since TS 4.2. The circular references type issue if I think solved by 3.7. I know that the Redux package has some built-in support for backwards compatibility with these newer features. I have a theory about what your problem is. I think that you are running your transpile command with a different version of TS than what is specified in your package.json. If you are initiating the command through an IDE, make sure that the IDE settings have the correct TS version. Related SO answer. |
I'm going to assume this is a project-specific build issue for now. If you do come up with a totally separate reproduction of the issue and it's still happening, please comment and we can take a look. |
We are trying to use
redux-toolkit
in our stencil js, typescript project. Once we import thecreateAsyncThunk
, I'm getting the below error.[51:07.6] transpile started ...
[51:08.8] transpile finished in 1.20 s
[ ERROR ] TypeScript: ../../node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:43:21
Type alias 'ExcludeFromTuple' circularly references itself.
[ ERROR ] TypeScript: ../../node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:46:5
Type 'ExcludeFromTuple' is not generic.
[ ERROR ] TypeScript: ../../node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:47:14
Type alias 'ExtractDispatchFromMiddlewareTuple' circularly references itself.
[ ERROR ] TypeScript: ../../node_modules/@reduxjs/toolkit/dist/tsHelpers.d.ts:47:152
Type 'ExtractDispatchFromMiddlewareTuple' is not generic.
[ ERROR ] TypeScript: ../../node_modules/@reduxjs/toolkit/dist/getDefaultMiddleware.d.ts:26:36
Type 'ExcludeFromTuple' is not generic.
[51:08.8] build failed in 1.22 s
error Command failed with exit code 1.
The text was updated successfully, but these errors were encountered: