next.js Access storybook
See original GitHub issueinstall
npx sb init
run
npm run storybook
Here is the error report.Ask for help, thank you!
[./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined] 7.68 KiB {vendors~main}
+ 3233 hidden modules
ERROR in ./.storybook/preview.js-generated-config-entry.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.filter' in '/Users/tang/Desktop/ZATECH/myTeam/platform-sompo-web/my-page-sj/.storybook'
@ ./.storybook/preview.js-generated-config-entry.js 5:0-42
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/storybook-init-framework-entry.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js-generated-other-entry.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js-generated-other-entry.js ./node_modules/@storybook/addon-links/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-actions/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-actions/dist/preset/addArgs.js-generated-other-entry.js ./node_modules/@storybook/addon-backgrounds/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-backgrounds/dist/preset/addParameter.js-generated-other-entry.js ./.storybook/preview.js-generated-config-entry.js ./.storybook/generated-stories-entry.js ./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined
ERROR in ./.storybook/preview.js-generated-config-entry.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.for-each' in '/Users/tang/Desktop/ZATECH/myTeam/platform-sompo-web/my-page-sj/.storybook'
@ ./.storybook/preview.js-generated-config-entry.js 7:0-44
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/storybook-init-framework-entry.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js-generated-other-entry.js ./node_modules/@storybook/addon-docs/dist/frameworks/react/config.js-generated-other-entry.js ./node_modules/@storybook/addon-links/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-actions/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-actions/dist/preset/addArgs.js-generated-other-entry.js ./node_modules/@storybook/addon-backgrounds/dist/preset/addDecorator.js-generated-other-entry.js ./node_modules/@storybook/addon-backgrounds/dist/preset/addParameter.js-generated-other-entry.js ./.storybook/preview.js-generated-config-entry.js ./.storybook/generated-stories-entry.js ./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Get started with Storybook and Next.js
Create stories for full Next.js pages ... Next.js and Storybook have extremely compatible component models. Next.js uses components for pages and ...
Read more >How to setup Storybook with Next.js and Tailwind CSS
This command will install the storybook to your Next.js repository, there will be a prompt asking if you want to additionally install an...
Read more >Integrate Storybook in a Next.js Application - Egghead.io
Storybook is a tool for UI development. It makes development faster and easier by isolating components. This allows you to work on one...
Read more >Le's see how to use Storybook in Next.js based on TypeScript ...
First, we need to configure Storybook to use globals.css of Next.js . Open the ./storybook/preview.js file and modify it like the below.
Read more >storybook-addon-next/README.md at main - GitHub
You can start editing the page by modifying pages/index.js . The page auto-updates as you edit the file. API routes can be accessed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@eric-burel the core-js install helped.
npm install core-js@^3.0.1 --save-dev
. Thanks.@WYJTang did you check this already? https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#core-js-dependency-errors
Also do you have a reproduction or is it private code maybe?
Which version of Next are you using?