Closed madeinjei closed 2 weeks ago
Disclaimer This information might be inaccurate, due to it being generated automatically To resolve the PNPM install errors when setting up Storybook for Next.js, follow these steps:
Ensure you are using the latest version of Storybook by running:
pnpm dlx storybook@latest init
If you encounter errors, manually add the required Storybook packages for Next.js:
pnpm add --save-dev @storybook/nextjs @storybook/addon-essentials @storybook/addon-interactions @storybook/addon-links @storybook/addon-onboarding @storybook/blocks @storybook/react @storybook/test
Verify your package.json
includes the necessary dependencies and scripts for Storybook.
If issues persist, run the Storybook doctor command to diagnose problems:
pnpm dlx storybook@latest doctor
Refer to the initiate.ts file for more details on the initialization process.
/code/lib/cli/src/initiate.ts /code/lib/cli/src/automigrate/index.test.ts /docs/_snippets/storybook-addon-compiler-babel-auto-install.md /docs/_snippets/storybook-addon-essentials-install.md /code/core/src/server-errors.ts /docs/_snippets/storybook-addon-compiler-swc-auto-install.md /docs/_snippets/storybook-init-v7.md /code/lib/cli/src/upgrade.test.ts /docs/_snippets/nextjs-install.md /docs/_snippets/storybook-doctor.md /code/lib/cli/src/automigrate/fixes/missing-storybook-dependencies.ts /docs/_snippets/react-webpack5-install.md /code/core/src/common/js-package-manager/PNPMProxy.ts /code/lib/cli/src/helpers.test.ts /docs/_snippets/test-runner-execute.md /docs/_snippets/test-runner-execute-with-url.md /code/lib/cli/src/automigrate/fixes/sb-scripts.test.ts /code/lib/cli/src/automigrate/fixes/prompt-remove-react.ts /docs/_snippets/init-command-manual-framework.md /docs/_snippets/storybook-telemetry-storybook-enable-crash-reports.md /docs/_snippets/web-components-webpack5-install.md /docs/_snippets/test-runner-execute-with-flags.md /code/lib/cli/src/automigrate/fixes/sb-binary.test.ts /docs/get-started/install.mdx /docs/_snippets/storybook-a11y-install.md
I couldn't reproduce with a fresh next app.
Do you a have a reproduction repo you can share? If not, can you create one? Go to https://storybook.new or see repro docs. Thank you! ๐
I don't have a repo, but I also tried it on a blank project and I got the same error( and when I say blank I mean I just initialized node and only installed storybook
Hi there! Thank you for opening this issue, but it has been marked as stale
because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!
I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists โ we're always happy to help. Thanks so much for your understanding.
Describe the bug
Whenever I use PNPM to install storybook for nextjs it will install storybook successfully but then return errors when installing whatever packages it needs for the nextjs compatibility
Reproduction link
NONE
Reproduction steps
run
pnpm dlx storybook@latest init
in your nextjs project environmentSystem
Additional context
No response