SyntaxError:意外的标记。 asynchronous/等待节点8
试图使用async/await
快递。 但是得到错误
const getData = async () => { ^ SyntaxError: Unexpected token ( at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28)
节点版本 – 8.5.0
部分代码
const getData = async () => { return 'all done'; }
有任何想法吗? 谢谢