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

fix: openapi cjs import #6

Open
pietrodev07 opened this issue Oct 26, 2024 · 11 comments
Open

fix: openapi cjs import #6

pietrodev07 opened this issue Oct 26, 2024 · 11 comments

Comments

@pietrodev07
Copy link

pietrodev07 commented Oct 26, 2024

Hi, stoker now has problems with internal imports, can you fix it please? Thanks!

image

@w3cj
Copy link
Owner

w3cj commented Oct 26, 2024

Can you share your tsconfig.json? I cannot replicate this issue.

@pietrodev07
Copy link
Author

Can you share your tsconfig.json? I cannot replicate this issue.

Yeah, it's the same of your hono-starter!

@w3cj
Copy link
Owner

w3cj commented Oct 26, 2024

I cloned the repo fresh, used jsonContentOneOf and do not see the error.

Do you have moduleResolution set to bundler in tsconfig: https://github.com/w3cj/hono-open-api-starter/blob/main/tsconfig.json#L8

Do you have type set to module in package.json: https://github.com/w3cj/hono-open-api-starter/blob/main/package.json#L3

How are you importing jsonContentOneOf

@pietrodev07
Copy link
Author

I also cloned it this morning, but it gave an error!!

Sorry which version of nodejs are you using?

@w3cj
Copy link
Owner

w3cj commented Oct 26, 2024

Tested with v20.18.0 and v22.10.0

@pietrodev07
Copy link
Author

Tested with v20.18.0 and v22.10.0

Can you try with my version? 20.14.0

it seems very stranger thing....

@w3cj
Copy link
Owner

w3cj commented Oct 26, 2024

Tried with 20.14.0 and no issue.

@pietrodev07
Copy link
Author

pietrodev07 commented Oct 26, 2024

Tried with 20.14.0 and no issue.

I got an error cloning your starter repo.

I don't know to say! 🤣

@w3cj
Copy link
Owner

w3cj commented Oct 26, 2024

Are you on windows / mac or linux? I am testing on a mac.

@pietrodev07
Copy link
Author

Are you on windows / mac or linux? I am testing on a mac.

I'm on windows but I use git bash with zsh, so bash linux friendly!

@pietrodev07
Copy link
Author

Are you on windows / mac or linux? I am testing on a mac.

I'm on windows but I use git bash with zsh, so bash linux friendly!

I downgraded to pnpm 8.15.4 version and now everything works, with 9.9.0 version gives an error.

Which version of pnpm are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants