undefined is not an object (evaluating 'regeneratorRuntime.mark') in react native on generator functions
See original GitHub issuewhen 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:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

To fix this I needed to create another
.babelrcin the/storybookdirectory with this content: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.
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!