Load EcmaScript module

hi i have some probleme when add EcmaScript module to node-red

this module use import not require
so how add it to functionGlobalContext in settings.js
same CommonJS method or other way to add it!

In Node.js, import works differently to import in the browser. You will need to read up on that difference.

Most JS modules written with import are assuming that you will have a build step that "compiles" the code. Possibly the simplest thing to do would be to raise an issue against the module and ask the author how to use it with node.js (or whether it is possible).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.