bit icon indicating copy to clipboard operation
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

Open TropicolX opened this issue 2 years ago • 0 comments

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: image

Expected Behavior

Seeing my react component overview and previews

Screenshots, exceptions and logs

image image

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_modules folder and pnpm-lock.yaml file, running bit clear-cache && bit capsule delete --all && bit install e.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 image

TropicolX avatar May 22 '23 10:05 TropicolX