Skip to content
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]: Upgrade fails with npx storybook@latest upgrade #30306

Open
Profesor08 opened this issue Jan 19, 2025 · 6 comments · May be fixed by #30371
Open

[Bug]: Upgrade fails with npx storybook@latest upgrade #30306

Profesor08 opened this issue Jan 19, 2025 · 6 comments · May be fixed by #30371

Comments

@Profesor08
Copy link

Describe the bug

Trying to upgrade from v8.4.7 to v8.5.0 and get this error. Something is wrong with dependecnies. There is already closed similar issue (#29169).

$ npx storybook@latest upgrade
WARN An issue occurred while trying to find dependencies metadata using npm.
╭───────────────────────────────────────────────────────────────╮
│                                                               │
│   Upgrading Storybook from version 0.0.0 to version 8.5.0..   │
│                                                               │
╰───────────────────────────────────────────────────────────────╯
info Checking for upgrade blockers...
No blockers found.

info Updating dependencies in package.json..
Installing dependencies...

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @storybook/[email protected]
npm ERR! node_modules/@storybook/react
npm ERR!   dev @storybook/react@"^8.5.0" from the root project
npm ERR!   @storybook/react@"8.4.7" from @storybook/[email protected]
npm ERR!   node_modules/@storybook/react-vite
npm ERR!     dev @storybook/react-vite@"^8.5.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @storybook/react@"^8.5.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @storybook/[email protected]
npm ERR! node_modules/@storybook/test
npm ERR!   peerOptional @storybook/test@"8.5.0" from @storybook/[email protected]
npm ERR!   node_modules/@storybook/react
npm ERR!     dev @storybook/react@"^8.5.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Reproduction link

https://stackblitz.com/edit/vitejs-vite-izegxbtn

Reproduction steps

No response

System

$ npx storybook@latest info

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.26100
    CPU: (24) x64 AMD Ryzen 9 3900XT 12-Core Processor
  Binaries:
    Node: 22.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.7.2 - C:\Program Files\nodejs\npm.CMD <----- active
  Browsers:
    Edge: Chromium (131.0.2903.86)
  npmPackages:
    @storybook/addon-essentials: ^8.4.7 => 8.4.7
    @storybook/addon-interactions: ^8.4.7 => 8.4.7
    @storybook/addon-onboarding: ^8.4.7 => 8.4.7
    @storybook/blocks: ^8.4.7 => 8.4.7
    @storybook/react: ^8.4.7 => 8.4.7
    @storybook/react-vite: ^8.4.7 => 8.4.7
    @storybook/test: ^8.4.7 => 8.4.7
    eslint-plugin-storybook: ^0.11.0 => 0.11.0
    storybook: ^8.4.7 => 8.4.7

Additional context

No response

@Rainfords
Copy link

Same issue with same versions 8.4.7 > 8.5.0

@jbouder
Copy link

jbouder commented Jan 22, 2025

Same issue here, from 8.4.7 to 8.5.0

@shnigi
Copy link

shnigi commented Jan 23, 2025

Same issue, 8.4.7 to 8.5.1

npm error code ERESOLVE npm error ERESOLVE could not resolve npm error npm error While resolving: [email protected] npm error Found: @storybook/[email protected] npm error node_modules/@storybook/react npm error dev @storybook/react@"^8.5.1" from the root project npm error @storybook/react@"8.4.7" from @storybook/[email protected] npm error node_modules/@storybook/preset-react-webpack npm error @storybook/preset-react-webpack@"8.4.7" from @storybook/[email protected] npm error node_modules/@storybook/react-webpack5 npm error dev @storybook/react-webpack5@"^8.5.1" from the root project npm error 1 more (@storybook/react-webpack5) npm error npm error Could not resolve dependency: npm error dev @storybook/react@"^8.5.1" from the root project npm error npm error Conflicting peer dependency: @storybook/[email protected] npm error node_modules/@storybook/test npm error peerOptional @storybook/test@"8.5.1" from @storybook/[email protected] npm error node_modules/@storybook/react npm error dev @storybook/react@"^8.5.1" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. Error: Error: Command failed with exit code 1: npm install

@CodyCodeman
Copy link

workaround for me was to explicitly install the test package first and then run the npx upgrade command

npm install @storybook/test@"^8.5.1"
npx [email protected] upgrade

@shnigi
Copy link

shnigi commented Jan 24, 2025

workaround for me was to explicitly install the test package first and then run the npx upgrade command

npm install @storybook/test@"^8.5.1"
npx [email protected] upgrade

Seems to work! Thanks

@bapplejax
Copy link

workaround for me was to explicitly install the test package first and then run the npx upgrade command

npm install @storybook/test@"^8.5.1"
npx [email protected] upgrade

unfortunately, this did not fix the issue for me:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants