renatomoor / storybook-tailwind-dark-mode

MIT License
20 stars 16 forks source link

Incompatible with Storybook 7 Beta #13

Closed TristanBrotherton closed 1 year ago

TristanBrotherton commented 1 year ago

Running the latest beta of Storybook 7 beta gives the following error:

WARN You (or an addon) are using the 'config' preset field. This has been replaced by 'previewAnnotations' and will be removed in 8.0
✘ [ERROR] Could not resolve "@storybook/addons"

    node_modules/storybook-tailwind-dark-mode/dist/withGlobals.js:8:22:
      8 │ var _addons = require("@storybook/addons");
        ╵                       ~~~~~~~~~~~~~~~~~~~

  You can mark the path "@storybook/addons" as external to exclude it from the bundle, which will
  remove this error. You can also surround this "require" call with a try/catch block to handle this
  failure at run-time instead of bundle-time.

12:17:43 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/storybook-tailwind-dark-mode/dist/withGlobals.js:8:22: ERROR: Could not resolve "@storybook/addons"
    at failureErrorWithLog (/Project/node_modules/esbuild/lib/main.js:1596:15)
    at /Project/node_modules/esbuild/lib/main.js:1052:28
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

This thread may be of interest:

renatomoor commented 1 year ago

@freddyamarante has made the fix and has also released the new version