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

nanoid seems to prevent build on sveltekit #507

Closed
jurb opened this issue Aug 24, 2023 · 2 comments
Closed

nanoid seems to prevent build on sveltekit #507

jurb opened this issue Aug 24, 2023 · 2 comments

Comments

@jurb
Copy link

jurb commented Aug 24, 2023

When I build my project using this library with sveltekit using pnpm run build, I get the following error message:

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/Users/jur/repos/node_modules/nanoid/non-secure' is not supported resolving ES modules imported from /Users/jur/repos/gpt/.svelte-kit/output/server/entries/endpoints/api/chat/_server.ts.js
Did you mean to import nanoid/non-secure/index.js?

I don't exactly understand the problem but this nanoid issue might help: ai/nanoid#365.

@MaxLeiter
Copy link
Member

Our package uses nanoid@3.3.6, so I think this is an upstream problem.

Running pnpm -r why nanoid in the ai root I see nanoid 4.0.2 only under nuxt/telemetry, not under any of the sveltekit packages.

@jurb
Copy link
Author

jurb commented Aug 25, 2023

You are right, a bare app from the example does build. My apologies!

@jurb jurb closed this as completed Aug 25, 2023
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