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.

storybook bundling error

See original GitHub issue

Describe the bug After upgrading material-ui “4.7.1” a few days ago, I can’t run storybook anymore. this is the error given when bundling:

ERROR in ./node_modules/@material-ui/core/esm/Popper/Popper.js Module not found: Error: Cannot find file: ‘popper.js’ does not match the corresponding name on disk: ‘./node_modules/@material-ui/core/esm/Popper/Popper.js’.

in the file ./node_modules/@material-ui/core/esm/Popper/Popper.js it’s importing like this: import PopperJS from 'popper.js'; I think storybook thinks it’s a file whereas popper.js is a dependency package for material-ui

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Tucker-Ericcommented, Jan 2, 2020

I was running into the same issue and I was able to fix this locally with adding the following to .storybook/webpack.config.js

module.exports = ({ config }) => {
  config.resolve.alias = {
    'popper.js$': 'popper.js/dist/esm/popper.js',
    ...config.resolve.alias
  };
  return config;
};

I think this may just be a windows issue due to case insensitivity where it’s thinking poppper.js should resolve to Popper.js and the names don’t match. I was receiving the error on windows but not on CentOS.

I hope this helps!

1reaction
barakplasmacommented, Oct 29, 2020

thanks @Tucker-Eric for https://github.com/storybookjs/storybook/issues/9077#issuecomment-570402934 , it was the only way for me to fix our Next.js 9.1.1 SSR builds after upgrading to Storybook 6.0.26

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook fails to show stories - Stack Overflow
In our case, the issue was actually a circular dependency between a few files that used the component we wanted to create stories...
Read more >
Webpack - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
Errors component • chromaui/chromatic-cli
This indicates a problem with your Storybook. ... WARN Assets: WARN vendors~main.8387e2f6505d1198087b.bundle.js (3.88 MiB) WARN entrypoint size limit: The ...
Read more >
storybook cannot read properties of undefined - You.com
Error storybook TypeError: Cannot read properties of undefined (reading 'get') ... -ui-storybook-add-1ac290.iframe.bundle.js:35987:24 Module.
Read more >
Issues with Storybook (REDWOOD ...
... running yarn rw storybook I'm getting these errors Initializing the ... [webpack-dev-middleware] wait until bundle finished 38% building ...
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