We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
To use async functions in Koa in versions of node < 7.6, we recommend using babel's require hook.
async
require('babel-register'); // require the rest of the app that needs to be transpiled after the hook const app = require('./app');
To parse and transpile async functions, you should at a minimum have the transform-async-to-generator or transform-async-to-module-method plugins. For example, in your .babelrc file, you should have:
.babelrc
{ "plugins": ["transform-async-to-generator"] }
You can also use the env preset with a target option "node": "current" instead.
"node": "current"