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

fix: try to prevent npm update issue #2894

Merged
merged 1 commit into from
Feb 18, 2025
Merged

fix: try to prevent npm update issue #2894

merged 1 commit into from
Feb 18, 2025

Conversation

bashmish
Copy link
Member

@bashmish bashmish commented Feb 18, 2025

What I did

I'm entering a dangerous zone here, but some fix is needed and testing it with local npm link or prereleases I think is not a good idea, so gonna test with a proper release.

Supporting both Storybook 7 and 8 within the same package with peerDependencies is not working.
npm update gives an error currently in a project where Storybook 7 is used with @web/mocks and @web/storybook-builder

npm error Found: [email protected]
npm error node_modules/storybook
npm error   dev storybook@"^7.6.20" from the root project
npm error
npm error Could not resolve dependency:
npm error peer storybook@"^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0" from @storybook/[email protected]
npm error node_modules/@storybook/manager-api
npm error   peer @storybook/manager-api@"^7.0.0 || ^8.0.0" from @web/[email protected]
npm error   node_modules/@web/mocks
npm error     dev @web/mocks@"^1.2.3" from the root project
npm error

So now trying with normal dependencies, which is actually even logical, because storybook doesn't really have to install the packages in question itself, it's more for the addons to do since they use them, so using peer deps was not a good idea to begin with.

Copy link

changeset-bot bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 1bd1e53

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@web/storybook-utils Patch
@web/mocks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@bashmish bashmish merged commit e5f5797 into master Feb 18, 2025
8 of 9 checks passed
@bashmish bashmish deleted the fix/npm-update branch February 18, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant