Installing Johnny5 in Node-red on BeagleBone - `npm: command not found`

Hello

I am a beginner in node red, I have a beaglebone black with node red loaded. I have tried to install the johnny5 library on node red using

npm install node-red-contrib-johnny5

And I get this message :

root@BeagleBone:~# npm install node-red-contrib-johnny5
bash: npm: command not found

I check the version of Node.js and I get this:

root@BeagleBone:~# node -v
v12.22.12

When I do the same with npm I get this message,

root@BeagleBone:~# npm -v
bash: npm: command not found

Is there any other way to install Johnny5?

Regards

I think there are problems.

1 - you are not in the correct path.
I believe you should be in the node-red directory when you npm install command.
2 - you probably shouldn't be running node-red with ROOT privileges.

you do not have npm installed

Node version is too old (I recommend V18 LTS - it is still in support and i find it is more supported than v20)

Do not run as root (you will only have permissions issues later and it has the potential to be unsafe if your node-red is compromised - since it will have super powers)


There is specific BeagleBone info here: Running on BeagleBone Boards : Node-RED but i fear is it outdated. I know @dceejay has knowledge in this area - hopefully he can chime in.

If your node.js is so out of date, Node-red might be too.

This video might be relevant.

1 Like

From the video at 2m 27s - "Except that this is all nonsense" :rofl:

An update to the docs would be nice!

Thanks to all

I will follow the instructions in the video, it is very clear the procedure.

I will let you know how it goes

hello to all
I installed on the eMMC memory the latest version of debian (from the SD card), but now I can't open node-red on the IP 192.168.7.2:1880 nor the IP 192.168.7.2:3000 of the cloud 9 IDE.

I do not understand what is happening, because I can ping the 192.168.7.2 and also enter through Putty to the settings.

Another thing, when I connect the BBB to the USB port of the laptop it does not recognize it as a USB device.

I have not been able to boot it from the SD either.

I have been trying to solve it these days, but I have not been able to do it.
I am quite confused

Have you tried 127.0.0.1:1880?
As I am guessing it is on the same machine.

Open a terminal:

cd .node-red
node-red-status

What do you get?

HOW did you install Node-red on the new machine?

I have no response from 127.0.0.1:1880
I found this command to install npm

apt install nodejs npm

root@BeagleBone:~# node -v
v12.22.12
root@BeagleBone:~# npm -v
7.5.2
then install node-red with
sudo npm install -g --unsafe-perm node-network

root@BeagleBone:~# sudo npm install -g --unsafe-perm node-red
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'node-red@3.1.3',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'fs-extra@11.1.1',
npm WARN EBADENGINE required: { node: '>=14.14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'node-red-admin@3.1.1',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'got@12.6.0',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'hpagent@1.2.0',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@sindresorhus/is@5.6.0',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@szmarczak/http-timer@5.0.1',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'cacheable-lookup@7.0.0',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'cacheable-request@10.2.14',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'form-data-encoder@2.1.4',
npm WARN EBADENGINE required: { node: '>= 14.17' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'responselike@3.0.0',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'normalize-url@8.0.0',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }

added 304 packages, and audited 305 packages in 7m

45 packages are looking for funding
run npm fund for details
found 0 vulnerabilities

Then
root@BeagleBone:~# cd ~/.node-red
bash: cd: /root/.node-red: No such file or directory

It seems that node-red did not install

I must have made a mistake in the procedure?

As mentioned earlier, that is too old

I have a feeling you have not really upgraded as per the video instructions

Hello

Good news

Finally I was able to update node.js and npm version

debian@BeagleBone:~$ node -v
v20.11.0
debian@BeagleBone:~$ npm -v
10.2.4

I even installed johnny5 to have access to the BBB pins.

Now I will be able to start programming in node red.

Thank you very much for your help

2 Likes

Hello again

I had installed the johnny five node on my node-red , but I noticed that it only gives me access to the digital inputs and outputs and not to the analog inputs , which are the ones I am most interested in.

Using the manage pallete in node-red I found these versions of Johnny Five , but none of them allow me access to the analog inputs

node-red-contrib-johnny-five
node-red-contrib-johnny5
node-red-contrib-johnny5-te

Any suggestions for other libraries ?

Regards,

As this does not seem to relate to the title of the thread (npm not found) it would probably be better to start a new thread with a relevant title.

Thanks

I will do so.

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