Ative o nó do módulo ES6
// To use ES6 module import in node
// --> import myDependency from 'myDependency' instead of
// --> const myDependency = require('myDependency')
Add "type": "module" in the nearest package.json.
AttractivePenguin