#npx upgrade to 7.1.0-alpha crashed

10 messages · Page 1 of 1 (latest)

lament spruce
#

I ran the upgrade command to get the 7.1 alpha, and it crashed after declining the mdx migrations. Doesn't give much info though...

#

I ran it again and got an error about invalid dependencies:

#
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @storybook/testing-react@2.0.0
npm ERR! Found: @storybook/react@7.1.0-alpha.0
npm ERR! node_modules/@storybook/react
npm ERR!   dev @storybook/react@"7.1.0-alpha.0" from the root project
npm ERR!   @storybook/react@"7.1.0-alpha.0" from @storybook/react-vite@7.1.0-alpha.0
npm ERR!   node_modules/@storybook/react-vite
npm ERR!     dev @storybook/react-vite@"7.1.0-alpha.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @storybook/react@"^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0" from @storybook/testing-react@2.0.0
npm ERR! node_modules/@storybook/testing-react
npm ERR!   dev @storybook/testing-react@"2.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @storybook/react@7.0.2
npm ERR! node_modules/@storybook/react
npm ERR!   peer @storybook/react@"^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0" from @storybook/testing-react@2.0.0
npm ERR!   node_modules/@storybook/testing-react
npm ERR!     dev @storybook/testing-react@"2.0.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.
#

I really hate how semver works for pre-releases sometimes. using --legacy-peer-deps fixes the resolution issue, but not the first.

#

Running the migrations doesn't help, I still get the error.

#

@abstract wharf I think you're the resident codemod writer, maybe you might know what's happening here.

#

npx upgrade to 7.1.0-alpha crashed

#

Using legacy-peer-deps isn't great either, because then I end up with a mix of 7.0.2 and 7.1.0-alpha.0 storybook dependencies, duplicated in my node_modules.

swift tundra
#

Shoot. We’ll fix this today

lament spruce
#

sorry I wasn't able to dig in any deeper to try to figure out what was going on with the error. It didn't give much to go off of.