Riot-nodes error

I try to install it on RPI4 and i've got this:

pi@raspberrypi:/usr/lib/node_modules/node-red $ npm install /usr/lib/node_modules/riot-nodes-master
npm notice created a lockfile as package-lock.json. You should commit this file.
+ riot-xbee@0.0.1
updated 1 package in 10.571s

5 packages are looking for funding
  run `npm fund` for details

. According to the above report is it installed properly?

You should have asked first.

It looks like you download the SRC to /usr/lib/node_modules/riot-nodes-master`` then tryed to npm install it to /usr/lib/node-red`

Why are you installing from a download?

Why in that folder?

You should run npm install from the path ~/.node-red

Can't find this folder ~/.node-red

How did you install node-red on the raspberry pi? Did you use the official installer script?

actually, it was pre-installed

Which probably means you have a very old version of node-red and very old node-js

what does node -v show?
what version of node-red (look in the hamburger menu of node-red)?

You should update using official script before you do anything.


PS, if you insist on using the reply button at the bottom of this thread (instead of the reply button at the bottom of my comment) I dont get a notification & dont know you are replying to me.

v.12.8.4

One commenter here says that the riot project is very old, so maybe I should try an old version first and then update?

Sure, worth a shot. I was expecting node-js version 8 or 10 (12 is not too old)

But updating node-red (and keeping node-js v12) is still recommended.

So, how to find ~/.node-red ?

did you try cd to it?

image

1 Like

I would still strongly recommend installing/updating node-red correctly using official PI installer script...

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

ā†‘ do NOT use sudo!

OK, but how to find the directory of the folder?

Like i showed you...

cd ~/.node-red

Yes, i did this, but I'm used to window, so i wish to see the whole path

pwd

image

It was hidden, that's why i can't see it

That what the . means (e.g. .hidden-folder)

You would probably benefit from using mc on linux if you are not familiar

  • install midnight commander ( sudo apt install mc )

zozBdU9PFz

1 Like

I will try this.
I try to install and i've got the error for serial port, so now i have to looking for how to install it on RPI, right?

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@4.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the serialport@4.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-07-10T16_50_54_994Z-debug.log
pi@raspberrypi:~/.node-red $ 

What did you try to install?

Did you run node-red install/update script as I strongly recommended?

I thought, that we agree to try first with old version, because the riot project is old?

So, i try first to install the riot project.