I am getting the following error:
ReferenceError: regeneratorRuntime is not defined
and it is caused by
_asyncToGenerator(regeneratorRuntime.mark(function _callee() {
I have tried the methods in Babel 6 regeneratorRuntime is not defined with async/await and also RegeneratorRuntime is not defined, but have no luck.
My .babelrc
is as below
{
"presets":["latest"]
}
I am able to solve the problem by add require('babel-polyfill')
however this line will throw problem if I run it with babel-node
during development time.
Anyone faced similar problem before?