Hi all,
I'm trying to use the module node-crc and while other imported modules work, I cannot get this one to work.
1st attempt:
called with:
const result = nodecrc.crc(...)
always ends up with:
TypeError: Cannot read properties of undefined (reading 'crc')
2nd attempt as functionGlobalContext
:
Error loading settings file: /home/vent/.node-red/settings.js
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/vent/.node-red/node_modules/node-crc/lib/lib.js from /home/vent/.node-red/settings.js not supported.
Instead change the require of lib.js in /home/vent/.node-red/settings.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/vent/.node-red/settings.js:432:17)
at Object.<anonymous> (/usr/lib/node_modules/node-red/red.js:140:20) {
code: 'ERR_REQUIRE_ESM'
}
Any pointer would be appreciated.