-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
The requested module does not provide an export
when using barrel export with Prisma
#12764
Closed
7 tasks done
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Comments
bluwy
added
p3-minor-bug
An edge case that only affects very specific usage (priority)
and removed
pending triage
labels
Apr 7, 2023
Looks like our interop code needs to handle star re-exports: vite/packages/vite/src/node/plugins/importAnalysis.ts Lines 859 to 864 in f09551f
|
It seems impossible that re-export * from a cjs module cause we don't know what cjs module contains after esbuild prebundle. Maybe we should directly throw an error |
9 tasks
7 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
What I am doing
Importing from a barrel export of
@prisma/client
causes a syntax error at runtime:"The requested module x does not provide an export y"
e.g.
Notably, just importing directly from
@prisma/client
works perfectly fine.I have no reason to suspect this is a Prisma-specific issue as the same usage in create-react-app has no issues.
Reproduction
https:/ryanjchr/vite-prisma-incompatibility
Steps to reproduce
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: