-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: Error [ERR_REQUIRE_ESM]: require() of ES Module at @storybook/addon-docs #29467
Comments
Hi @mistic This PR might fix your issue: #29544 |
Hi @valentinpalkovic, I'm on the same team as @mistic. Thanks for the PR, the canary release is working for
|
I believe this is happening because you're not using the Storybook CLI to build your Storybook, but instead That is not a public API and we don't support that pattern in any way. I'm fine with trying to fix |
@JReinhold would it be possible to make this API official and public, and add tests for it as well? The Nuxt module also relies on it, and we experience similar issues: nuxt-modules/storybook#825 |
Describe the bug
We are trying to upgrade the internal usage of storybooks from v6 into v8 and we are now facing an issue that was introduced by #25615.
We launch the storybook builds through a Node.js script that uses the
buildStandalone
function from@storybook/react/standalone
. During the node resolution phase we got the following error:The cause seems to be related with the fact that the cjs build of
@storybook/addon-docs
is requiring an ESM module. It feels to me this PR should be reverted until a better alternative to replace those packages is found or the interop for esm and require is better supported on node (initial interop was released on node v22 but has limitations and it is still experimental).\cc @JReinhold
Reproduction link
elastic/kibana#195148
Reproduction steps
yarn kbn bootstrap
&&yarn storybook esql_editor
System
Storybook v8
Additional context
No response
The text was updated successfully, but these errors were encountered: