fix(storybook): migrate Storybook v8 -> v10, repairing the Pages deploy - #109
Merged
Conversation
Fixes the `Build storybook` step in deploy.yml, which has failed on every push to main for at least two days, and closes Dependabot alert #46. Root cause: package.json declared @storybook/react-vite at ^10.3.4 while storybook/@storybook/core stayed at ^8.6.0. Storybook 8 core cannot load a v10 builder, so preset resolution died with: Error: Cannot find module '.../@storybook/builder-vite/dist/index.js' Because the build step failed, every later step in the job — including the deploy — was skipped, so GitHub Pages has not published since. Changes: storybook ^8.6.0 -> ^10.5.5 @storybook/addon-a11y ^8.6.0 -> ^10.5.5 @storybook/react-vite ^10.3.4 -> ^10.5.5 @storybook/addon-essentials removed (folded into core in v9+) @storybook/blocks removed (folded into core in v9+; was declared but never imported) Config and stories now import from the framework package (@storybook/react-vite) rather than the renderer (@storybook/react), which was never a declared dependency and only resolved transitively. Closes #46 (uuid, medium) as a side effect: @storybook/addon-actions 8.6.18 was the only thing pulling uuid ^9.0.0, and Storybook 9+ dropped that dependency. uuid is now absent from the tree entirely, so this is a real removal rather than a resolutions override. Verified: build-storybook completes successfully, plus build, 286 unit tests, typecheck, lint and format:check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the broken GitHub Pages deploy and closes Dependabot alert #46 (
uuid).The deploy has been failing on every push
Deploy to GitHub Pageshas failed 6 runs in a row, going back to before any of this weeks security work. TheBuild storybookstep dies, and because it fails, every later step — including the deploy itself — is skipped:So Pages has not published in days. (This is also what looked like "tests being cancelled" — nothing is cancelled; steps after the failure are skipped, which renders greyed-out.)
Root cause
package.jsondeclared@storybook/react-viteat^10.3.4whilestorybook/@storybook/corestayed at^8.6.0. Storybook 8 core cannot load a v10 builder, so preset resolution died:I confirmed this reproduces on a clean
mainworktree, so it is genuinely pre-existing and not a side effect of the dependency work.Changes
storybook^8.6.0→^10.5.5@storybook/addon-a11y^8.6.0→^10.5.5@storybook/react-vite^10.3.4→^10.5.5@storybook/addon-essentials@storybook/blocksConfig and stories now import from the framework package (
@storybook/react-vite) instead of the renderer (@storybook/react) — the latter was never a declared dependency and only resolved transitively, which is its own latent breakage.Closes #46 (
uuid, medium) properly@storybook/addon-actions@8.6.18was the only thing pullinguuid@^9.0.0, and it was pinned to a major we could not reach. Storybook 9+ dropped theuuiddependency entirely, so after this migrationuuidis absent from the lockfile:That is a real removal, not a
resolutionsoverride — which is exactly why I left it unfixed in #106 rather than forcing a pin.Verification
yarn build-storybook— Storybook build completed successfully (this is the previously failing step)yarn build· 286 unit tests ·yarn typecheck·yarn lint·yarn format:check— all pass