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't install storybook with Angular v16.1.0 #23568

Closed
morenoisidro opened this issue Jul 23, 2023 · 2 comments · Fixed by #23598
Closed

[Bug]: Can't install storybook with Angular v16.1.0 #23568

morenoisidro opened this issue Jul 23, 2023 · 2 comments · Fixed by #23598

Comments

@morenoisidro
Copy link

Describe the bug

I'm trying to install storybook@latest in an Angular v16.1.0 project and installation fails.

I have created single-workspace Angular project (v16.1.0) with Angular CLI. (Check source code here ):

When I run: npx storybook@latest init

Issue: Builder is not detected and project is recognized as an Nx project, but I'm not using Nx.

Output:

✔ We were not able to detect the right builder for your project. Please select one: › Webpack 5

     Error: We have detected Nx in your project. Please use "nx g @nrwl/storybook:configuration" to add Storybook to your project.

For more information, please see https://nx.dev/packages/storybook
    at runGenerator (/Users/isidro/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:89:5803)
    at installStorybook (/Users/isidro/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:93:795)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async doInitiate (/Users/isidro/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:98:845)
    at async withTelemetry (/Users/isidro/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/core-server/dist/index.js:113:3659)
    at async initiate (/Users/isidro/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:111:602)

Workaround (kind of...): I've tried npx storybook@7.0.6 init and everything went fine. But noticed v7.1.0 was installed instead. Weird... - Check resulting changes here

To Reproduce

  1. Checkout https://github.com/morenoisidro/ng-kitsune/tree/v0.1.0
  2. Run npx storybook@latest init

System

Environment Info:

  System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 18.16.1 - /usr/local/bin/node
    npm: 9.5.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 115.0.5790.102
    Edge: 115.0.1901.183
    Safari: 16.5.2

Additional context

No response

@valentinpalkovic
Copy link
Contributor

We will fix this soon-ish. In the meantime, please try to initialize with Storybook 7.0

npx storybook@7.0.27 init

It will still set up your project with Storybook 7.1 dependencies. Let me know whether this works as a temporary workaround.

@morenoisidro
Copy link
Author

Thanks @valentinpalkovic ! I noticed you already pushed a fix. Glad it wasn't a false positive. Thanks for your help!

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

Successfully merging a pull request may close this issue.

3 participants