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

CLI: Do not use legacy-peer-deps for npm #20456

Merged
merged 2 commits into from
Jan 1, 2023
Merged

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Dec 30, 2022

Issue: #18298

What I did

Removed the use of --legacy-peer-deps from npm commands, since it is no longer needed with storybook 7.0+. The npm7 migration was removed previously.

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@shilman shilman changed the title Do not use legacy-peer-deps CLI: Do not use legacy-peer-deps for npm Jan 1, 2023
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! 🎉

@shilman shilman merged commit b31c2d2 into next Jan 1, 2023
@shilman shilman deleted the remove-legacy-peer-deps branch January 1, 2023 09:33
@miallo
Copy link

miallo commented Jan 5, 2023

Nice! Thanks a lot! That is great :)

I ran npx sb upgrade --prerelease and it installed 7.0.0-beta.19, but I am still getting the prompt

We've detected you are running npm 8.5.0
which has peer dependency semantics which Storybook is incompatible with.
In order to work with Storybook's package structure, you'll need to run npm with the
--legacy-peer-deps=true flag. We can generate an .npmrc which will do that automatically.
More info: #18298

Unfortunately I don't know where this prompt is coming from, so I don't know where to ask...

@IanVS
Copy link
Member Author

IanVS commented Jan 5, 2023

When you run npx sb, that's actually running the version of the CLI from 6.5. To run the latest-and-greatest for 7.0, use npx sb@next instead.

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

Successfully merging this pull request may close these issues.

3 participants