express-es6-rest-api
express-es6-rest-api copied to clipboard
async/await syntax
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?
Having the same problem, not via docker, just running in production
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';
You need babel-plugin-transform-runtime: https://stackoverflow.com/a/36821986/1252528