I don't know if you know that node.js is moving from commonjs (require) to JavaScript modules (import).
For node.js i use it already, in projects and packages, and I recommend it also to you to start with the migration.
Now in node.js 16 commonjs is not recommend anymore.
In node.js 18 you receive warnings that it will be deprecated.
In node.js 20 it will be deprecated. (2023?)
You can set the type to module in the package.json so node.js understand it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't know if you know that node.js is moving from commonjs (require) to JavaScript modules (import).
For node.js i use it already, in projects and packages, and I recommend it also to you to start with the migration.
Now in node.js 16 commonjs is not recommend anymore.
In node.js 18 you receive warnings that it will be deprecated.
In node.js 20 it will be deprecated. (2023?)
You can set the type to module in the package.json so node.js understand it.