Sections
es modules
1 thread tagged with this topic
Threads tagged es modules
- ✓
How do I fix Cannot use import statement outside a module in Node.js?
Node.js is treating your file as CommonJS, where import is not allowed. Tell Node the file is an ES module: add "type": "module" to the nearest package.json...
0replies