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')

See original GitHub issue

Is this a bug report?

Yes (write your answer here)

Have you read the Bugs section of the Contributing to React Native Guide?

(Write your answer here.)

Environment

  1. react-native -v: 0.45.1
  2. node -v: 8.1.3
  3. npm -v: 5.0.4
  4. yarn --version (if you use Yarn): 0.27.5

Then, specify:

  1. Target Platform (e.g. iOS, Android): Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra 10.12.5
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Android SDK 25, Android Build Tools 25.0.2

Steps to Reproduce

(Write your steps here:)

  1. react-native init AwesomeProject
  2. react-native run-android

Expected Behavior

Should work as it did with RN v0.44.0 or RN 0.45.0 (Write what you thought would happen.)

Actual Behavior

undefined is not an object (evaluating 'regeneratorRuntime.mark')
<unknown>
    
loadModuleImplementation
    require.js:174:12
guardedLoadModule
    require.js:126:36
_require
    require.js:110:24
<unknown>
    index.js:2
loadModuleImplementation
    require.js:174:12
guardedLoadModule
    require.js:126:36
_require
    require.js:110:24
<unknown>
    configureStore.js:19
loadModuleImplementation
    require.js:174:12
guardedLoadModule
    require.js:126:36
_require
    require.js:110:24
<unknown>
    index.js:32
loadModuleImplementation
    require.js:174:12
guardedLoadModule
    require.js:126:36
_require
    require.js:110:24
<unknown>
    index.android.js:10
loadModuleImplementation
    require.js:174:12
guardedLoadModule
    require.js:119:45
_require
    require.js:110:24
global code
   
screen shot 2017-07-05 at 22 42 33

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:53
  • Comments:92 (23 by maintainers)

github_iconTop GitHub Comments

77reactions
ernoaapacommented, Jul 6, 2017

Found the problem what I had (with new project generated with Ignite).

The error were pointing in my project to line import rootSaga from '../Sagas/' which contain export like this:

export default function * root () {
  yield [
    // ... snip ....
  ]
}

After changing it to this started to work:


const root = function * root () {
  yield [
    // .... snip ....
  ]
}
export default root

I’m not yet familiar with the ES6 generator functions and require support for them, but at least now I can continue. And have to say that the error were pointing to the place where the invalid export were. I hope this helps someone.

37reactions
Amurmurmurcommented, Jul 9, 2017

@vongohren Double make sure you reset the packager, Im using react-native 0.46.1 and babel at 2.0.0 all good on both platforms Debug/Release builds. Please make sure you run

watchman watch-del-all
rm -rf ./node_modules
rm -rf $TMPDIR/react-*
npm i babel-preset-react-native@2.0.0 -D -S
npm install
npm start -- --reset-cache
react-native run-ios

Also make sure you reset your android/ios emulator/simulator, delete both android/ios build folders.

Read more comments on GitHub >

github_iconTop Results From Across the Web

undefined is not an object (evaluating 'regeneratorRuntime ...
Hello guys I somehow managed to get it working, I removed the caret(^) symbol from the versions of all the packages mentioned in...
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 >
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 >
How to fix regeneratorRuntime is not defined?
Solution · later learned that babel-polyfill is deprecated. So, to solve the regeneratorRuntime problem, do this: · Install regenerator-runtime
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