Custom nodes deleted on palette install


We created 3 custom nodes (that are not to be shared on github). They work well in our environment. But each time we install a palette, they get deleted. I have to recover them throught git.

Anyone has any clue how to prevent that? I guess I have to reference them elsewhere.

We are on Windows 10

Hi @Andydesjardins

how exactly have you installed them into node-red? If they are not listed in ~/.node-red/package.json then npm will remove them when you install another node - one of the 'features' of more recent npm versions.

Hello @knolleary,

(Nice job on Node-RED)

We followed the procedure except that we didn't published on npm. The custom nodes are in the package.json under the dependencies section. Any clue?


Ok I found the way to do it. If someone need the answer:

Don't put custom node directly in the node-red/node_modules directory. Instead, I placed them in a folder next to node-red folder. In command line, go in the node-red folder, npm install

It creates a junction from the node-red/node_modules folder to the custom node foder. It also add a path to the custom node folder in the node-red/package.json AND node-red/package-lock.json.

Ah, I didn't realise you had been copying files directly into the node_modules directory. This is why I asked how exactly you had installed them. Your response said you had followed our instructions... but they do not say to copy files like that.

Glad you figured it out.