ReferenceError: regeneratorRuntime is not defined when using async/await syntax
See original GitHub issueI’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:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top 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 >
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
"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.
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?