-
-
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
Issue installing a fork of RTK Query Codegen #4571
Comments
Are you missing |
Thank you for your response. I did try that. That was the first fix that I tried and got this:
Then I also tried |
Just a guess but you might be running a node version that is too new? I believe in node > 18 you need to use a module customization hook in order to use imports without an extension, or a directory import. |
Ok. Thanks for the pointer. I will try it out. |
@phryneas Can you please confirm if the current tsconfig.json is correct? https://github.com/reduxjs/redux-toolkit/blame/master/packages/rtk-query-codegen-openapi/tsconfig.json I think the current tsconfig does not match up with the build on NPM. Changing the tsconfig fixed the issue for me. |
I honestly have no idea right now, I'm sorry. I believe some things there were merged (#4198), but not published yet. |
I have a working PR that will hopefully fix this. |
@phryneas that is ok. Thank you for looking into this. Feel free to take this issue forward as you please. |
Should be live in https://github.com/reduxjs/redux-toolkit/releases/tag/%40rtk-query%2Fcodegen-openapi%402.0.0-alpha.0 ! Please try it out and let us know if it works. |
I wanted to modify the RTK Query Codegenerator (packages/rtk-query-codegen-openapi for my usecase.
So my first step was to extract the codegen folder from the repo and try to use it in my project without making changes.
I tried to install it as a local package but I kept getting an error.
This is what I did next: I tried to upload it to the npm registry, thinking if I installed it the same way as the original package it will work. It is not and I think I may be doing something wrong and would help understanding what exactly.
When I run
npx testing-openapi openapi-config.ts
, I get this error:If I add
type: module
to my copy of the rtk-query codegen package, I get this error:I decided to compare some files in my installation and the original installation. Please note the filepaths to understand the context of both files. If you notice, the two files are different in the first 4-5 lines.
I would really appreciate some help fixing this. I have been at it for a few hours now.
The text was updated successfully, but these errors were encountered: