express-es6-rest-api icon indicating copy to clipboard operation
express-es6-rest-api copied to clipboard

async/await syntax

Open texas697 opened this issue 8 years ago • 3 comments

I am using async/await syntax in my project. runs fine with PORT=8080 npm run dev but when i try to run via docker i get error ReferenceError: regeneratorRuntime is not defined do I need to modify babel?

texas697 avatar Aug 04 '17 21:08 texas697

Having the same problem, not via docker, just running in production

escobar5 avatar Aug 14 '17 12:08 escobar5

Hi there - you need to import regenerator. Most people do this by adding this line to src/index.js after running npm i -S babel-runtime:

import 'babel-runtime';

developit avatar Nov 18 '17 00:11 developit

You need babel-plugin-transform-runtime: https://stackoverflow.com/a/36821986/1252528

giiska avatar Dec 12 '17 09:12 giiska