Ewelink API

Been trying to make this work.

npm install seemed to go fine.

To import, it gives this example

const ewelink = require('ewelink-api');

but I get an error:

TypeError: Cannot load CommonJS module: 'events'

Any ideas how to make this work?

I assume you are trying to use this with OH Rules?

One important thing to note is GraalVM JavaScript the way it’s implemented in the openHAB add-on only provides a Node.js like environment. There is no guarantee that any given node module will work. It for sure will not work if it depends on anything related to the Node.js event loop. Tthe name events hints that may be the case here.