bit
bit copied to clipboard
"Uncaught Error: ES modules may not assign module.exports or exports.*" for component overviews and previews when using a custom tailwind env
Describe the bug
When I create a custom tailwind env (via this article on bit https://bit.dev/blog/integrating-tailwind-css-and-bit-for-component-styling-lgntqstt/#live-playground-support), I set my UI components to use the env, and then I run the bit start, the preview and overview of the components don't work and I get this error:
Expected Behavior
Seeing my react component overview and previews
Screenshots, exceptions and logs
Specifications
- Bit version: 0.1.48
- Workspace type: harmony
- Node version: 18.16.0
- npm / yarn version: 9.5.1 / 1.22.19
- Platform: Apple M1 Pro MacOS Ventura 13.3.1
for harmony workspace
- relevant env: shopthru.shared-scope/tailwind-env
Additional context
- I've tried deleting
node_modulesfolder andpnpm-lock.yaml file, runningbit clear-cache && bit capsule delete --all && bit installe.t.c but I still get the same error. - Tagging and exporting the components works fine and I can see the preview on bit.cloud but it doesn't work on development server