energychain / AnkerSolixE1600

AnkerSolixE1600 Node.JS
Apache License 2.0
8 stars 3 forks source link

Cannot find module 'node-fetch' #3

Open marco-ehnert opened 2 months ago

marco-ehnert commented 2 months ago

After updating to node-red 4.x the Anker Solix Solarbank E1600 integration is not working any more:

Error: Cannot find module 'node-fetch' Require stack:

Installation in the container /opt/node_modules/ is not soling the problem npm install -g node-fetch

marco-ehnert commented 2 months ago

After update of Home Assistent today

Error: require() of ES Module /config/node_modules/node-fetch/src/index.js from /config/node_modules/ankersolixe1600/SolixAPI.js not supported. Instead change the require of index.js in /config/node_modules/ankersolixe1600/SolixAPI.js to a dynamic import() which is available in all CommonJS modules.