storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.61k stars 9.31k forks source link

[Bug]: We cannot build storybook 7.6.10 anymore #28502

Closed DarkDynamite closed 4 months ago

DarkDynamite commented 4 months ago

Describe the bug

Since one hour our Storybook in version 7.6.10 is not buildable anymore.

Have you some issues with your dependencies?

Logs:

2024-07-10T08_57_45_205Z-eresolve-report.txt 2024-07-10T08_57_45_205Z-debug-0.log

Reproduction link

https://storybook.new

Reproduction steps

Reproduction with Azure Pipeline:

  - script: |
      npm install -g @angular/cli
      npm install
    displayName: "Install NPM dependencies"

Reproduction locally:

npm install

System

ubuntu, mac os

Additional context

No response

greptile-apps[bot] commented 4 months ago

The issue might be related to recent changes in dependencies or configurations. Please try the following steps:

  1. Check for Angular JSON issues: Ensure your angular.json file is correctly configured. If you are using multiple projects, refer to /code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts.

  2. Run Storybook Automigrate: This can help fix configuration issues. Use the command:

npx storybook automigrate
  1. Check for Missing Framework Field: Ensure your Storybook config has a framework field. Refer to /code/core/src/server-errors.ts for MissingFrameworkFieldError.

  2. Upgrade Storybook: If the issue persists, try upgrading Storybook to the latest version:

npx storybook@latest upgrade

Refer to the upgrade documentation for more details.

References

/code/lib/cli/src/automigrate/fixes/angular-builders.ts /code/lib/cli/src/automigrate/fixes/angular-builders-multiproject.ts /code/frameworks/angular/src/builders/build-storybook/index.spec.ts /code/core/src/server-errors.ts /docs/_snippets/upgrade-command-specific-version.md /docs/_snippets/storybook-upgrade-to-prior-major.md /docs/_snippets/storybook-init-v7.md

#### About Greptile This response provides a starting point for your research, not a precise solution. Help us improve! Please leave a ๐Ÿ‘ if this is helpful and ๐Ÿ‘Ž if it is irrelevant. [Ask Greptile](https://app.greptile.com/chat/github/storybookjs/storybook/next) ยท [Edit Issue Bot Settings](https://app.greptile.com/apps/github)
yannbf commented 4 months ago

Hey @DarkDynamite we just released a new version of Storybook, but that's not the issue. The problem you reported is coming from how the peer dependency range of storybook-zeplin addon is set (based on your log file):

Could not resolve dependency:
peer storybook@"^8.2.0" from @storybook/components@8.2.0
node_modules/@storybook/components
  peer @storybook/components@">=5.0.0" from storybook-zeplin@2.0.2
  node_modules/storybook-zeplin
    dev storybook-zeplin@"2.0.2" from the root project

You probably cleared your lockfile and that caused the issue. To fix it, either install @storybook/components@^7.6.10 in your project, or add a package resolution to that version.

DarkDynamite commented 4 months ago

Thanks for your help.

Adding the following packages to devDependencies did the trick:

"@storybook/components": "7.6.10",
"@storybook/theming": "7.6.10",