Adding an external github module to a function node


I can easily and conveniently add an npm module to a function node.

Is it possible to use a github version of a module?


Not directly.

I haven't done it before but you could try installing the module from github using the the NPM CLI then try importing it.


cd ~/.node-red
npm install https://github.x.y.z

Please let us know if you try and if it works :slight_smile:

Doesn't appear to work unfortunately. Doesn't seem to use the GitHub prefix in the way that npm itself does.

Would be a good feature request I think.

Steve's suggestion worked though 'I think' it's quite intricate to be sure -:slight_smile:

My situation was as follows -:

  • Created two repos -: Module1-Node-red and Module2. Module1-Node-red depended on Module2. (Module2 existed on NPM but I had modified)

  • Then added Module2 to a function.

  • When I restarted node-red Module2 was overwritten to become the npm version.

I think using Steves approach of add module2 from my github on its own worked