Node.js – SyntaxError: Unexpected token import
Node 13+ Since Node 13, you can use either the .mjs extension, or set {“type”: “module”} in your package.json. You don’t need to use the –experimental-modules flag. Modules is now marked as stable in node.js Node 12 Since Node 12, you can use either the .mjs extension, or set “type”: “module” in your package.json. And you need to run node with the –experimental-modules flag. Node 9 In Node 9, it is enabled behind a flag, and … Read more