-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Address No "exports" main defined in package json for vite #18287
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Rodrigo Espinosa de los Monteros <1084688+RodEsp@users.noreply.github.com>
@RodEsp Good catch thanks, updated |
@philipp-spiess Sorry to ping you but this bug is affecting us and was wondering if you wouldn't mind reviewing this PR for me please? |
Doesn't this imply that you have to use a version of node where afaik the only reason this would fail is because |
Yeah I get the feeling something is wrong in playwright's component testing which uses Vite under the hood to create the components bundle and serve it. // playwright-ct.config.ts
import { default as tailwindcss } from "@tailwindcss/vite";
import { defineConfig } from "@playwright/experimental-ct-react";
export default defineConfig({
use: {
ctViteConfig: {
plugins: [react(), tailwindcss()],
},
},
}); I can see from the error tract that they are using the CJS loader. I'll try and make time to create a reproduction which I'll share in a new issue |
Summary
Package JSON is missing the main property
Fixes: #16751
Resolves:
Test plan
I applied this fix directly in my local node modules and this fixed the error