-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Inconsistent openapi-typescript import #35
Comments
I believe this bug occurs with module resolution To opt-in to this behaviour, once can use: export default defineNuxtConfig({
typescript: {
tsConfig: {
compilerOptions: {
moduleResolution: 'bundler',
},
},
},
}) … Which is already being used by the playground. Types seem to be imported differently, as well as the module import itself. Edit: Should be fixed in v0.15.2. |
@killjoy1221 Can you verify that it now works as intended? 🙂 |
Yes, it works fine now.
…On Wed, Aug 23, 2023 at 7:43 AM Johann Schopplich ***@***.***> wrote:
@killjoy1221 <https://github.com/killjoy1221> Can you verify that it now
works as intended? 🙂
—
Reply to this email directly, view it on GitHub
<#35 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AQKVWL4QCLCBJM44INW3XWXUGTANCNFSM6AAAAAA3Z6X6J4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Environment
Reproduction
Reproduction can be done with the playground being run separate from the rest of the repo.
Describe the bug
Whether
openapi-typescript
is imported as a module or function seems to depend on whether the package is installed in node_modules. When in node_modules, it behaves as expected, being imported as a module. Otherwise, it imports the function. I'm not sure whether this is an issue with node or typescript.I suggest the following change to openapi.ts.
Additional context
No logs were created to indicate an error, just the types not being generated. When I edited the javascript to add a
console.error()
inside the catch block surroundingopenapiTS()
, I got the erroropenapiTS is not a function
.Logs
The text was updated successfully, but these errors were encountered: