// add this in package.json
{
"type": "module"
}
// Note: "import" should generally be used for modules/package projects, otherwise use
// "require"
// In your NodeJS project's package.json add the following "type" field to allow use of "import":
{
"type": "module"
}