docs icon indicating copy to clipboard operation
docs copied to clipboard

Update usage.md

Open jaysonng opened this issue 1 year ago • 2 comments

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

jaysonng avatar Jan 10 '24 09:01 jaysonng

That's only true for old Node.js versions

mtrezza avatar Jan 13 '24 19:01 mtrezza

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?

jaysonng avatar Jan 15 '24 03:01 jaysonng