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 Storybook build is broken in an Nx monorepo when updating from v7.0.6. I've tested with v7.0.7 and v7.0.8 separately and the build has broken with the same error:
> NX Storybook builder starting ...
info => Cleaning outputDir: /dist/storybook/bee-q
info => Loading presets
info => Building manager..
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "DOCS_PREPARED"
node_modules/@storybook/blocks/node_modules/@storybook/preview-api/dist/chunk-34WDGA45.mjs:6:356:
6 │ ..._CHANGED, STORY_PREPARED, DOCS_PREPARED, STORY_MISSING, STORY_TH...
╵ ~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "DOCS_PREPARED"
node_modules/@storybook/docs-tools/node_modules/@storybook/preview-api/dist/chunk-34WDGA45.mjs:6:356:
6 │ ..._CHANGED, STORY_PREPARED, DOCS_PREPARED, STORY_MISSING, STORY_TH...
╵ ~~~~~~~~~~~~~
> NX Build failed with 2 errors:
node_modules/@storybook/blocks/node_modules/@storybook/preview-api/dist/chunk-34WDGA45.mjs:6:356: ERROR: No matching export in "global-externals:@storybook/core-events" for import "DOCS_PREPARED"
node_modules/@storybook/docs-tools/node_modules/@storybook/preview-api/dist/chunk-34WDGA45.mjs:6:356: ERROR: No matching export in "global-externals:@storybook/core-events" for import "DOCS_PREPARED"
Pass --verbose to see the stacktrace.
> NX Running target "bee-q:storybook-build" failed
Failed tasks:
- bee-q:storybook-build
Hint: run the command with --verbose for more details.
View structured, searchable error logs at https://cloud.nx.app/runs/HOxaLg9NJW
ERROR: "build:storybook" exited with 1
@dgonzalezr Can you try clearing your package lock & node_modules and reinstalling? The DOCS_PREPARED event was introduced in 7.0.7 and this error would occur if an older version of @storybook/core-events was being used. Alternatively you could try npm ls @storybook/core-events to see which versions are being used in your project.
Hi @dgonzalezr! Thanks for reporting. To clarify, the problem DOES NOT exist in 7.0.6 and DOES exist in 7.0.7/7.0.8/7.09?
Hi @shilman , yes, the problem DOES NOT exist in v7.0.6 of storybook. Regarding cleaning the npm_modules I did that and it is something failing also on our CI pipeline.
Hi @shilman , getting back to you. You were right, our dependency update bot didn't pick the storybook package when updating all the @storybook/* dependencies, therefore a wrong version of @storybook/core-events was used. Cleaning the package-lock and node-modules and bumping storybook fixed the issue. I'm closing this ticket now.
Thanks a lot 🙌🏼
Describe the bug
The Storybook build is broken in an Nx monorepo when updating from v7.0.6. I've tested with v7.0.7 and v7.0.8 separately and the build has broken with the same error:
To Reproduce
You can see the related change on our public repo, here in this PR.
Checkout the repo from this specific branch: https://github.com/Endava/bee-q/tree/chore/%40storybook
the build broke with the following output:
System
The text was updated successfully, but these errors were encountered: