-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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]: npx@latest upgrade crashes, also regression bug #29169
Comments
I don't understand how the error message correlates with the issue you described. Can you elaborate? |
There are two separate issues. The first is the regression where the caret is being injected again. That was fixed a few versions back and now it's returned. The second it that when you run This happened on three completely separate projects when I upgraded each. |
I also faced this when upgrading from 8.3.0 to 8.3.1 and also facing this issue now. |
This is still happening when I ran
|
I can reproduce this. Here are my steps:
|
I've investigated this further, and it's really npm acting very strange with strict peer dependencies. If you have a fresh project (like described above), with all Storybook dependencies pinned to It seems that while trying to install the changed dependencies, npm looks into the If you delete I'm not saying this isn't something we should try to fix, just saying that npm is acting strange when upgrading pinned peer deps. |
I was having this problem and the only thing I could do to get past it was override the react version to force a specific version like
or
|
This seems to have something to do with removing the pnpm package.json fix. That’s when it started happening. |
This is still happening with every version. I'm at 8.4.2 and the only solution is to delete node_modules and package-lock.json and reinstall everything. |
@stevensacks Can you give a repro for that. We tried to fix that with this PR: We also patched this PR back to 8.2.10 and 8.3.7. I still got into this issue with a project that was using addon designs: I also changed the peer dep constraints there: If you can make a repro, maybe there are more externals addons that need to change. |
@kasperpeulen It's happening in every project that I have. Here's my open source Remix template where it's happening: https://github.com/gaia-react/remix You can run My projects all have these storybook libraries. Perhaps having one of these in package.json is the cause? "devDependencies": {
"@storybook/addon-essentials": "8.4.2",
"@storybook/addon-interactions": "8.4.2",
"@storybook/addon-links": "8.4.2",
"@storybook/blocks": "8.4.2",
"@storybook/manager-api": "8.4.2",
"@storybook/preview-api": "8.4.2",
"@storybook/react": "8.4.2",
"@storybook/react-vite": "8.4.2",
"@storybook/test": "8.4.2",
"@storybook/theming": "8.4.2",
"@storybook/types": "8.4.2",
"storybook": "8.4.2",
} |
@kasperpeulen I've got a more simple repo it's happening on. My storybook addon. https://github.com/stevensacks/storybook-react-intl When I use |
Thank you so much @stevensacks for providing a repro. I think I found the issue. @storybook/react has a peer dependency of @storybook/test, however, @storybook/react-vite, which has a direct dependency of @storybook/react, doesn't have a peer dependency of @storybook/test, thus breaking this chain. I am making some experimentations to see if I can solve this issue! |
Describe the bug
Running
npx sb@latest upgrade
for version 8.3.2 has two issues:Regression bug with pinned dependencies
There was a previous fix where if the package.json dependency versions were pinned, the upgrade script would not insert a caret before the version anymore. This issue has returned. A
^
is being injected on pinned dependencies.npm error
The only fix for this is to delete node_modules and package-lock.json and run
npm install
. Then 8.3.2 will install correctly.Reproduction link
https://storybook.js.org/
Reproduction steps
Run
npx sb@latest upgrade
on a project that has 8.3.1.System
Additional context
No response
The text was updated successfully, but these errors were encountered: