During Storybook-dist TypeError: _interopRequireDefault is not a function
See original GitHub issueDescribe the bug
Running storybook via start-storybook
will render all my components and work perfectly. Once I try to export to a static version using build-storybook.
The following error appears:
13:01:57.164 define-property.js:1 TypeError: _interopRequireDefault is not a function
at Object.<anonymous> (index.js:1)
at __webpack_require__ (bootstrap:2)
at Object.<anonymous> (index.js:1)
at Object.<anonymous> (index.js:1)
at __webpack_require__ (bootstrap:2)
at webpackContext (index.js:1)
at index.js:1
at Array.forEach (<anonymous>)
at index.js:1
at render (index.js:10)
error @ define-property.js:1
and none component is shown on storybook.
I tried to search for a solution but with no success so far. I don’t know why storybook 4 and 5 work correctly and only fail during the build process.
To Reproduce Steps to reproduce the behavior: I don’t know what exactly is causing this. But any ideas about how can debug the issue will be appreciated
Expected behavior
storybook-build
site behaves exactly like the one when running storybook-start
Screenshots
Code snippets If applicable, add code samples to help explain your problem.
System:
- OS: MacOS
- Device: Macbook Pro
- Browser: Chrome
- Framework: react
- Addons: [if relevant]
- Version: 4.0.0 and 5.0.0
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@nahumzs If you’d be able to do some debugging on that css issue on what exactly in our code is making that possible at development but impossible at static build, I’d be keen to know.
Would be a great contribution to the project 👏
Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.4 containing PR #7051 that references this issue. Upgrade today to try it out!
Closing this issue. Please re-open if you think there’s still more to do.