You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v6 test case works fine, while v7 has a Cannot find module error.
This looks like an error caused by the index.mjs file in @storybook/store importing the cjs version of lodash in a way that doesn't conform to the esm specification
The text was updated successfully, but these errors were encountered:
Describe the bug
The
dist/index.mjs
file in the@storybook/store
package is not really a valid esmTo Reproduce
https://github.com/0xDing/storybook-es-issue
System
Environment Info:
System:
OS: macOS 12.6
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 18.10.0 - /private/var/folders/pd/n93d7dmn1tvgzs__q_9lv__h0000gn/T/xfs-3e420a0b/node
Yarn: 3.2.4 - /private/var/folders/pd/n93d7dmn1tvgzs__q_9lv__h0000gn/T/xfs-3e420a0b/yarn
npm: 8.19.2 - ~/.volta/tools/image/npm/8.19.2/bin/npm
Browsers:
Chrome: 106.0.5249.119
Firefox: 105.0.3
Safari: 16.0
npmPackages:
@storybook/addon-docs: ^7.0.0-alpha.38 => 7.0.0-alpha.38
@storybook/addon-essentials: ^7.0.0-alpha.38 => 7.0.0-alpha.38
@storybook/addon-interactions: ^7.0.0-alpha.38 => 7.0.0-alpha.38
@storybook/addon-links: ^7.0.0-alpha.38 => 7.0.0-alpha.38
@storybook/react: ^7.0.0-alpha.38 => 7.0.0-alpha.38
@storybook/react-vite: ^7.0.0-alpha.38 => 7.0.0-alpha.38
@storybook/testing-library: ^0.0.13 => 0.0.13
@storybook/testing-react: ^1.3.0 => 1.3.0
Additional context
Vitest is a vite based test runner that runs in ESM. And, I have written two unit test files in reproduce repo:
import { composeStories } from '@storybook/react'
*src/stories/v6.Buttton.stories.test.tsx -
import { composeStories } from '@storybook/testing-react'
(According to yarn.lock, @storybook/testing-react imports the 6.4.0 version of @storybook/react)The v6 test case works fine, while v7 has a Cannot find module error.
This looks like an error caused by the index.mjs file in @storybook/store importing the cjs version of lodash in a way that doesn't conform to the esm specification
The text was updated successfully, but these errors were encountered: