Closed BB-000 closed 8 months ago
The error you're encountering indicates an issue with using an import statement outside of a module. This usually happens when using the import syntax in a file that is not recognized as a module by Node.js.
Node.js Version: Make sure that your Node.js version supports ECMAScript modules (ESM). If you are using a version of Node.js that is older than version 13, you might need to enable ESM in your project.
To enable ESM, you can add "type": "module" to your package.json file:
{
"type": "module",
// other configurations...
}
I've installed and tried to implement as directed, but cannot get it to work and get this error. Anyone else run into this / know how to fix it..?
I believe it's to do with
index.js
usingrequire()
, but don't know how to remedy this...