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.

ReferenceError: regeneratorRuntime is not defined when using async/await syntax

See original GitHub issue

I’m submitting a bug report

  • Library Version: 0.18.0

Please tell us about your environment:

  • Operating System: Windows 10

  • Node Version: 6.4.0

  • NPM Version: 3.10.3

  • Browser: all

  • Language: ESNext

  • Babel configuration (standard)

"presets": [ "es2015-loose", "stage-1"],
  "plugins": [
    "syntax-flow",
    "transform-decorators-legacy",
    "transform-flow-strip-types"
  ]

Current behavior: Using async/await in an app generated with the aurelia-cli results in getting ERROR [app-router] ReferenceError: regeneratorRuntime is not defined

Reproducing Just try to use async/await in any ViewModel.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
lpj145commented, Oct 17, 2016

"prepend": [ "node_modules/babel-polyfill/dist/polyfill.min.js", "node_modules/bluebird/js/browser/bluebird.core.js", "node_modules/tether/dist/js/tether.min.js", "scripts/require.js" ]

And uncomment Promise.config.

1reaction
Leonidneicommented, Sep 13, 2016

How to add “necessary generator runtime library to your app”? Currently we have babel and babel-runtime in config.js, how to deal with this going to aurelia-cli?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"regeneratorRuntime is not defined" error with async ... - GitHub
I get a "regeneratorRuntime is not defined" error when using @babel/preset-env and "useBuiltIns": "usage" with a nested async arrow function ...
Read more >
regeneratorRuntime is not defined in React - Stack Overflow
I'm getting an error "Uncaught ReferenceError ...
Read more >
How to fix regeneratorRuntime is not defined?
First, I found this solution: add import "babel-polyfill"; at the top of the file that you are using the async function. BUT.
Read more >
[Solved]-Rollup fails to transpile async/await - appsloveworld
Coding example for the question Rollup fails to transpile async/await - regeneratorRuntime is not defined-babel.js.
Read more >
cypress-io/cypress - Gitter
I am running into an issue trying to use async/await in my tests. The error I am seeing is Uncaught ReferenceError: regeneratorRuntime is...
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