Open jaysonng opened 8 months ago
For await to work, it needs to be inside an async function. or else an error will occur
SyntaxError: await is only valid in async functions and the top level bodies of modules
That's only true for old Node.js versions
interesting. I'm running node 18.
is that for node 20? and what can we do you think to add to these docs for subtle differences in node version code?
For await to work, it needs to be inside an async function. or else an error will occur
SyntaxError: await is only valid in async functions and the top level bodies of modules