ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

[BUG] Uncaught ReferenceError: regeneratorRuntime is not defined


I am having an error when I build JS code.

This is my code:

async function call(method, args = null) {
    const {message: data} = await{
        method: method,
        args: args

    return data

After I run bench build looks like the babel converts the code to ES2015. But it fails to generate the full code. After searching on internet, it is said that I have to install babel-polyfill but it did not work either.

The thing is, my code works on browsers and it does not need to convert from babel.