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.

undefined is not an object (evaluating 'regeneratorRuntime.mark') in react native on generator functions

See original GitHub issue

when exporting a generator function * () {}

e.g.

export default function() * {}

(which is common when using redux-saga)

this error is thrown in the app when its started with storybook: undefined is not an object (evaluating 'regeneratorRuntime.mark')

looks like this issue: https://github.com/facebook/react-native/issues/14838

but all the solution do not work as every babel plugin is installed and even in newer versions. Any idea whats wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
matt-oakescommented, Nov 20, 2017

To fix this I needed to create another .babelrc in the /storybook directory with this content:

{
  "presets": [
    "react-native"
  ]
}

I had to do this even though I had the same file in the root of the project. It doesn’t seem to pick this one up.

This workaround is ok, but if possible I think the packager should be able to pick up the babel config from the root repo to avoid duplication and potential issues when it is changed.

0reactions
stale[bot]commented, Jan 19, 2018

Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Read more comments on GitHub >

github_iconTop Results From Across the Web

undefined is not an object (evaluating 'regeneratorRuntime ...
Environment react-native -v: 0.45.1 node -v: 8.1.3 npm -v: 5.0.4 ... undefined is not an object (evaluating 'regeneratorRuntime.mark') # ...
Read more >
undefined is not an object (evaluating 'regeneratorRuntime ...
The problem is that one of your library is still importing the prop-types. from react-native bundle. You have to correct that.
Read more >
undefined is not an object (evaluating 'regeneratorRuntime.mark') in ...
undefined is not an object (evaluating 'regeneratorRuntime.mark') in react native on generator functions.
Read more >
undefined is not an object (evaluating 'regeneratorRuntime ...
Coding example for the question undefined is not an object (evaluating 'regeneratorRuntime.mark')- React Native-React Native.
Read more >
Updated to expo 20, getting warning about app.json - #3 by notbrent ...
Warning: Problem validating app.json: regeneratorRuntime is not defined. ... the error undefined is not an object (evaluating 'regeneratorRuntime.mark') .
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