I found a code error in a node and Id like to fix it..for my local install. Is there a way to tinker with loaded nodes and install them into the pallette without npm repository being updated and keeping a unique local version.
The best way to do that depends on which node it is and such factors as whether it has a github repository. Which one is it?
I asked about node-red architecture can you please address : Is there a way to tinker with loaded nodes and install them into the palette without NPM and thereby keeping a unique local version?
Let me ask a different way Id like to update my palette to my local install - I'm not sure how to do that. My plugins don't seem to reflect changes made to their code - when there's an active install in node-red.
Im not in charge of the git or NPM - and Id like to solve the issue locally on my own machine. Then when this is sorted ill talk about which plugin and which repository with the creator if they are open to it.
Yes there is, but the ideal way may not be the way described below, dependent on which node it is. In particular you can't do this with core nodes built into node-red I think.
However, to answer you question, if you have the source of the node in a folder
/path/to/folder/node_name, then you can install that by going into your .node-red folder and running
npm install /path/to/folder/node_name
then restart node-red. If you want to make further changes then node-red will pick them up after a restart, you don't need to install it again.
Don't delete that folder until after you uninstall the node again.
Thanks - The node - is sort of a middle ware interface with another node script. Ill try what you said and report back here.
For contrib nodes, go to the node_moduels folder in .node-red & hack away.
But if you update nodes from internet, hacks will be lost.
For node-red built in nodes, (depending on how you installed) goto your global npm folder, node_modules, node-red, node_modules, @node-red, nodes, core.
But. If you update, node-red, your hacks will be lost.
As Colin was alluding to, the best way depends on many factors.
In an ideal world, the node would be available on GitHub, you would fork it, clone to your dev machine, modify it, push it back to your fork, install your fork on the node-red install.
Thanks that's a direct answer to my question - Ill try that. I didn't have any luck with the previous.
Thankfully the git owner came to my rescue and fixed the bug in the node - but I learned a ton from you guys about node architecture and the opportunity to mod plugins locally is thrilling
I find it pays to contact the author before modding.
but now you have had a taste - perhaps you will start developing own nodes or contributing via Pull Requests?
PS, welcome to node-red addiction
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.