Jest won’t accept top-level-awaits with NodeJS16 & TypeScript
I’m trying to update my NodeJS12 & TypeScript app to Node16, one if the reasons is the need to use top-level-awaits.
I’m trying to update my NodeJS12 & TypeScript app to Node16, one if the reasons is the need to use top-level-awaits.
I have node 14.13.0, and even with --harmony-top-level-await
, top-level await is not working.
I have spent an hour now searching for a solution to a new error after needing top-level await. Everything else I have tried so far did not solve the error such as adding "type": "module"
to the package.json file.