How to Install node from GitHub

I'm sure this should be in the documentation somewhere but I have failed to find it.

I want to install a node from GitHub (it is a fork of a node in NPM - not installed via pallette).

How can I do that - system is a bare Ubuntu base (container in PVE, but that shouldn't matter). Node-red was installed using the Linux script and is about to be fully updated.

Obviously, I'll clone the repo from Github, but where to so it gets picked up? Are there any other steps required?

No need to clone the repo, you can install directly from github

Assuming the following git repo:

in your userDir (~/.node-red) run the following:

npm install hardillb/node-red-node-geofence
1 Like

Thanks will try that.

As a matter of interest, can you install both the NPM version and a forked version that will have the same package name?

No, for several reasons.

  • Assuming the npm package name hasn't changed then installing the second version will overwrite the first
  • Even if the npm package name has been changed unless the Node-RED node types haven't had their names changed then they will clash and Node-RED will raise and error when it tries to load the second version saying there is a clash and fail to load the second instance.
1 Like

Great thanks.

Final question, how can the node be completely removed?

You can remove it using the palette manager or using npm remove. So for the example earlier,
npm remove node-red-node-geofence
No need to specify the git author when removing.

1 Like

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