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.

During Storybook-dist TypeError: _interopRequireDefault is not a function

See original GitHub issue

Describe 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 Screen Shot 2019-05-31 at 1 16 32 PM

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

github_iconTop GitHub Comments

1reaction
ndelangencommented, Jun 11, 2019

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

0reactions
shilmancommented, Jun 13, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix TypeError _interopRequireDefault is not a function ...
In my case the solution was to clean jest cache: npx jest --clearCache.
Read more >
err! typeerror [err_invalid_arg_type]: the "id" argument must be ...
TypeError : The "id" argument must be of type string. Received an instance of Object ERR! at new NodeError (node:internal/errors:371:5) .
Read more >
How to solve Jest storybook test error ... - Kelechi Ogbonna
In this article, I am going to highlight how I got this storybook jest snapshot test error cannot find @babel/runtime/helpers/interopRequireDefault.js, ...
Read more >
Issue creating new project - RedwoodJS Community
Took 2881ms. and it opens localhost:8910 in my browser. That then shows: TypeError: _interopRequireDefault is not a function ../node_modules ...
Read more >
`npx sb init` and `npm run storybook` does not ... - Issuehunt
_load (internal/modules/cjs/loader.js:769:14) ERR! at Module.require ... (D:\Non CB Projects\library-storybook\node_modules\@storybook\angular\dist\ts3.9\ ...
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