Make Basic example from the README runnable in CommonJS environment #2378
Labels
Documentation
Evaluating
This ticket is still taken into consideration without a clear path forward.
The basic example in the README makes many assumptions about user environment and skills like a proper
type
field set in the closest package.json, or the user has copy-pasted the example to a file with.mjs
extension.In most cases, users will face the following problems:
(node:59910) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
SyntaxError: await is only valid in async functions and the top level bodies of modules
Environment:
The text was updated successfully, but these errors were encountered: