-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Vite Plugin Does Not Work With Storybook Vite #16751
Comments
When I add tailwindcss(), it throws an error: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '/Your/Project/Path/packages/ui/\x00/iframe.html' |
|
Related discussion: #16451 |
Regarding the origin error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/marcuswood/moonshot/platform/node_modules/@tailwindcss/vite/package.json
at exportsNotFound (node:internal/modules/esm/resolve:314:10)
at packageExportsResolve (node:internal/modules/esm/resolve:605:13)
at resolveExports (node:internal/modules/cjs/loader:640:36) I believe Storybook is still using the CJS API, thus the issue. |
FYI, currently,
I'm using Update: for now, I get around this by:
|
same issue here |
Same error (Storybook 8.5.8, Vite 6.1.0): |
Seems like there are two different errors being talked about in this issue. Let's use #16785 for the "must be a string, Uint8Array, or URL without null bytes" error and keep this issue for the "No "exports" main defined in" one. Thanks! |
What version of Tailwind CSS are you using?
4.0.7
What build tool (or framework if it abstracts the build tool) are you using?
Storybook Vite (8.5.8)
What version of Node.js are you using?
v22.12.0
What browser are you using?
N/A
What operating system are you using?
macOS
Describe your issue
Tried to integrate the Vite plugin with tailwind V4 in Storybook Vite (8.5.8) and hit this error:
Storybook config
If I add this patch, everything works no problem:
Not sure why this is needed, I keep getting mixed up on the ESM stuff. Looks pretty harmless to add? Filing the issue in case other people run into it!
The text was updated successfully, but these errors were encountered: