Is it possible through npm?

import path from "path"; //error var router = path.parse('new','cicik'); console.log(router.name); 

1 answer 1

Node.js c 9th version supports ES6 modules in experimental mode . To do this, run node with the --experimental-modules flag and the script must have the mjs extension. For example, node - experimentally-modules test.mjs