question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

next.js Access storybook

See original GitHub issue

install

   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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
junibrosascommented, Nov 20, 2020

@eric-burel the core-js install helped. npm install core-js@^3.0.1 --save-dev. Thanks.

2reactions
eric-burelcommented, Nov 20, 2020

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found