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

[Bug]: can not init storybook to use old version like 6.0 #22214

Closed
Tracked by #22557 ...
dadiorchen opened this issue Apr 21, 2023 · 7 comments
Closed
Tracked by #22557 ...

[Bug]: can not init storybook to use old version like 6.0 #22214

dadiorchen opened this issue Apr 21, 2023 · 7 comments

Comments

@dadiorchen
Copy link

Describe the bug

Because my project is using an old version of create react app, the newest storybook 7 does not support it, so I try to use old version of storybook by npx storybook@6 init, but after installment, the version installed is 7.0, the storybook always install the newest version.

To Reproduce

npx create-react-app test-storybook  && cd test-storybook/ && npx storybook@6 init

Then:

npm list | grep -i storybook

The output:

test-storybook@0.1.0 /root/work2/test-storybook
+-- @storybook/addon-actions@7.0.6
+-- @storybook/addon-essentials@7.0.6
+-- @storybook/addon-interactions@7.0.6
+-- @storybook/addon-links@7.0.6
+-- @storybook/addons@7.0.6
+-- @storybook/builder-webpack5@7.0.6
+-- @storybook/cli@7.0.6
+-- @storybook/manager-webpack5@6.5.16
+-- @storybook/node-logger@7.0.6
+-- @storybook/preset-create-react-app@7.0.6
+-- @storybook/react@7.0.6
+-- @storybook/testing-library@0.1.0

System

Environment Info:

  System:
    OS: Linux 5.18 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (2) x64 DO-Regular
  Binaries:
    Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
  npmPackages:
    @storybook/addon-actions: 7.0.6 => 7.0.6
    @storybook/addon-essentials: 7.0.6 => 7.0.6
    @storybook/addon-interactions: 7.0.6 => 7.0.6
    @storybook/addon-links: 7.0.6 => 7.0.6
    @storybook/addons: 7.0.6 => 7.0.6
    @storybook/builder-webpack5: 7.0.6 => 7.0.6
    @storybook/cli: 7.0.6 => 7.0.6
    @storybook/manager-webpack5: 6.5.16 => 6.5.16
    @storybook/node-logger: 7.0.6 => 7.0.6
    @storybook/preset-create-react-app: 7.0.6 => 7.0.6
    @storybook/react: 7.0.6 => 7.0.6
    @storybook/testing-library: 0.1.0 => 0.1.0

Additional context

No response

@shilman
Copy link
Member

shilman commented Apr 23, 2023

@JReinhold here's another versioning issue for the CLI

@foxaltus
Copy link

foxaltus commented May 4, 2023

This one is a bit embarrassing: I was trying to follow the Design System for developers tutorial, and both commands won't work:

npx storybook init

does not work because it's not compatible with the version of React in the tutorial

and:

npx storybook@6 init

does not work because it installs 7+ packages, as said in the issue...

Any workaround until this is fixed?

@wgu-jesse-stewart
Copy link

Same issue trying to install storybook 6.5 - I always get 7

@Cloud9Clone
Copy link

Same issue by my side. When I attempt to run the command npx storybook@6.5.16 init the latest version e.g. 7.0.22 gets installed instead of 6.5.16.

@jung-han
Copy link
Contributor

is there any update?

@ndelangen ndelangen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
@JReinhold
Copy link
Contributor

We're implementing this for 7.6, 8.0 and moving forward, but we will not be backporting this to Storybook 6.5 or earlier.

So that means in the future running npx storybook@7 init will correctly initialize a SB 7 project even though SB 8 would be the latest.

@dohkoxiaozu
Copy link

dohkoxiaozu commented Jan 18, 2024

We're implementing this for 7.6, 8.0 and moving forward, but we will not be backporting this to Storybook 6.5 or earlier.
So that means in the future running npx storybook@7 init will correctly initialize a SB 7 project even though SB 8 would be the latest.

Old projects can't install storybook7 because of node version issues, any solutions? Thank you!

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

No branches or pull requests

9 participants