ottopaulsen / node-red-contrib-power-saver

A Node-RED node to saver money by turning off when the power is most expensive
Other
71 stars 17 forks source link

Module not found after upgrade #13

Closed Swoop86 closed 2 years ago

Swoop86 commented 2 years ago

After upgrading to 3.0.0 (and now on 3.0.4), the palette view shows "MODULE_NOT_FOUND". image

kristianrd commented 2 years ago

I experience the same issue, version 3.0.2 and also after upgrade to 3.0.4

ottopaulsen commented 2 years ago

This is interesting. This is not a problem in my installation. Could you please investigate? Check the Node-RED log in see if there are any error messages related to this. What version of Node-RED do you run? Node version? Are you running in Home Assistant? Version and platform, and so on. I really don't know what this could be, but maybe I am usin some new features that are not supported.

Swoop86 commented 2 years ago

A wild guess it is related to this in the node-red log:

14 Dec 17:01:00 - [warn] [node-red-contrib-power-saver/ps-elvia-tariff-types] Error: Cannot find module 'node-fetch' Require stack:

ottopaulsen commented 2 years ago

That may very well be the problem. A couple of dependencies where not correctly defined. This should be fixed in version 3.0.5. Please update when you have tried.

Swoop86 commented 2 years ago

Not sure if I didn't see this one previously, but it's the only one giving a warning now:

4 Dec 22:19:07 - [warn] ------------------------------------------------------ 14 Dec 22:19:07 - [warn] [node-red-contrib-power-saver/ps-general-add-tariff] Error: Cannot find module '/config/node-red/node_modules/node-red-contrib-power-saver/src/general-add-tariff.js' Require stack:

It seems "general-add-tariff.js" is missing in /src

ottopaulsen commented 2 years ago

Sorry, I forgot to remove a reference to the next node I am creating. Fixed in 3.0.6.

Swoop86 commented 2 years ago

Looks all good now. Great work with the project!

kristianrd commented 2 years ago

Yup, can confirm it works now. Thanks a lot for the work you're putting in on this. Much appreciated!