agracio / edge-js

Run .NET and Node.js code in-process on Windows, macOS, and Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System.Exception:"ReferenceError: await is not defined at eval

dlxj opened this issue · comments

commented

my code:

    private async Task<string>  Start()
    {
        var func = Edge.Func(@"
        return function (data, callback) {
            let d = await ( async ()=>{
                return 'paaaaa'
            })()
            callback(null, 'Node.js welcomes ' + data + d);
        }
    ");

        string ret = (string)await func(".NET");
        return ret;
    }

System.Exception:"ReferenceError: await is not defined
at eval (eval at compileFunc (xxxxxx\bin\x64\Debug\edge\double_edge.js:53:27),:8:25)"