-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
npx sb init
does not work with NPM v7
#12983
Comments
Any idea why it's trying to resolve Try installing 6.1 instead? We've improved the dependency structure for React17 support.
|
@shilman Still does not work. I have tried this: nvm use 15
npx create-react-app my-app
cd my-app
npx sb@next init It produces this error:
|
Really weird. Will investigate. Thanks! |
Could not repro using brew node@15/npm@7 |
Hi, I have the same error with my new VueJS project when I try to use "npx -p @storybook/cli sb init". node 15 and npm 7 npm ERR! code ERESOLVE It requires two different versions of react. How do I do it? |
For what it's worth, I'm seeing the same behavior. |
Able to reproduce with the current default node container on dockerhub. |
@Rapi-shiny can you try |
[email protected]
|
It works, thank you! |
I have the original problem listed in this bug but also have the following problem when running Using versions: npm ERR! code ERESOLVE |
I can add my voice to the "workaround doesn't work" party.
Then after a fresh |
Same. We cannot integrate storybook into our app even if we do a completely fresh
I have already tried the |
Is this a problem with |
Hi @shilman, |
|
react 17.0.1 |
Storybook 16.6 Still unable to retrieve all dependencies |
Help me to downgrade npm 6 |
@Rubtsov-2015 you don't need to. Use the |
@phated is there a temporary workaround where we run |
@shilman based on this comment it seems that the flag actually needs to be passed to As for some of the initial comments, they were just having conflicts between peerDeps in addons that didn't have |
i tried
all of this 3 commands yields error
I can successfully install by using
|
Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.0-beta.6 containing PR #14106 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.21 containing PR #14106 that references this issue. Upgrade today to the
|
doing a |
@marcoavazquez in npm7
|
Another workaround (that also works for co-workers that might be unaware of the --legacy-peer-deps flag) is creating a
After that |
Great tip @vnglst 💯 |
This doesn't work for me. I'm getting the same error. After installing Storybook for a Vue 3 project:
|
Alright, not sure how it's solved now, but it is. |
works for me too. |
npm: 8.11.0
node: v16.15.1
vue: ^3.2.38
vite: ^3.1.0 I have the same problem with Vue3/Vite with the storybook. npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN peerOptional react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @storybook/[email protected]
npm WARN node_modules/@storybook/addon-actions
npm WARN dev @storybook/addon-actions@"^6.5.10" from the root project
npm WARN 1 more (@storybook/addon-essentials)
npm WARN 25 more (@storybook/addon-backgrounds, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.4 || ^17.0.0" from [email protected]
npm WARN node_modules/@storybook/addon-actions/node_modules/react-inspector
npm WARN react-inspector@"^5.1.0" from @storybook/[email protected]
npm WARN node_modules/@storybook/addon-actions
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN peer react@"^16.8.4 || ^17.0.0" from [email protected]
npm WARN node_modules/@storybook/addon-actions/node_modules/react-inspector
npm WARN react-inspector@"^5.1.0" from @storybook/[email protected]
npm WARN node_modules/@storybook/addon-actions
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @mdx-js/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN peerOptional react@"^16.8.0 || ^17.0.0 || ^18.0.0" from @storybook/[email protected]
npm WARN node_modules/@storybook/addon-actions
npm WARN dev @storybook/addon-actions@"^6.5.10" from the root project
npm WARN 1 more (@storybook/addon-essentials)
npm WARN 25 more (@storybook/addon-backgrounds, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.13.1 || ^17.0.0" from @mdx-js/[email protected]
npm WARN node_modules/@storybook/addon-docs/node_modules/@mdx-js/react
npm WARN @mdx-js/react@"^1.6.22" from @storybook/[email protected]
npm WARN node_modules/@storybook/addon-docs
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN peer react@"^16.13.1 || ^17.0.0" from @mdx-js/[email protected]
npm WARN node_modules/@storybook/addon-docs/node_modules/@mdx-js/react
npm WARN @mdx-js/react@"^1.6.22" from @storybook/[email protected]
npm WARN node_modules/@storybook/addon-docs
any new update? |
Describe the bug
The init script
npx sb init
does not work with NPM v7.To Reproduce
Steps to reproduce the behavior:
nvm use 15
.npx create-react-app my-app
.cd my-app
.npx sb init
.Expected behavior
I would expect the command
npx sb init
to add Storybook to the project, same way as when using older versions of NPM.System
Additional context
I think the problem is caused by a breaking change in NPM v7. It now installs peer dependencies automatically:
https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md
The text was updated successfully, but these errors were encountered: