Npm fails to install new node

Hi guys,

relatively new to Node Red. Actually I am using it as a teaching aid for my automation class here in New Zealand. We have enjoyed the limited time using Node Red thus far, but I have a small problem I hope you can assist with.

I need to install boolean gate logic. I found the following two sites, but I have been unsuccessful installing as per instructions (broken links as I am a new user that can only post max 2!) :
node-red-contrib-boolean-logic-ultimate
node-red-contrib-bool-gate

When I use NPM, (exactly as prescribed in those two links above) it initially appears to be working, however then it bombs out with several warnings. Near the top where it first appears to go wrong, it states:
npm WARN saveError ENOENT: no such file or directory, open '/home/unipi/package.json'

I have looked in the unipi directory, and this is true. There is no package.json file, however there is a package-lock.json.

I am remotely connected to Node-Red, that is running on a Raspberry Pi/UniPi1.1 combo.
The particular flavour of Node-Red I am using has been prebuilt specifically for the UniPi1.1 board:

Node-Red V1.0.6
Raspbian version: Debian GNU/Linux 10 (buster)

It probably doesn't matter, but for completeness sake, I am remotely connected to the UniPi/Node-Red install from my Ubuntu 20.04 Desktop machine.
Any help would be greatly appreciated, as we do need the logic (AND,OR, XOR etc.) gate stuff to be working, thank you

The full output/error is as follows:

Regards,
Graham

Hi Graham, welcome to the forum.

The warning you've posted is just that, a warning. It isn't a fatal error that would stop the npm install from working.

However, it does tell us you've likely run the npm install in the wrong directory - you should be running it in /home/unipi/.node-red.

If you still get errors (not warnings) when you run it in that directory, can you share more of the details so we can see what is going wrong?

Edit - I see you've posted a screenshot after I posted my original reply. That shows a successfully install of the module. However it is in the wrong directory.

Thanks for the prompt response! I'll try that now.

That did it, thanks so much. Huge thumbs up, as i have class in about 2 hours!
Next time I'll read the instructions...

1 Like

Also note that usually the easiest way to install nodes is to use the Manage Palette option in the node red editor. Then you don't have to worry about the command and don't need to restart node red.

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