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

**URL:** <https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106>\
**Category:** General\
**Created:** [1 February 2024 04:23 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106 "2024-02-01T04:23:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [1 February 2024 04:23 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/1 "2024-02-01T04:23:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [1 February 2024 07:30 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/2 "2024-02-01T07:30:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [1 February 2024 08:44 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/3 "2024-02-01T08:44:38Z")

</div>

> [@Pitufo](#):
>
> bash: npm: command not found

you do not have npm installed

> [@Pitufo](#):
>
> root@BeagleBone:~# node -v  
> v12.22.12

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

> [@Pitufo](#):
>
> root@BeagleBone

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](https://nodered.org/docs/getting-started/beaglebone) but i fear is it outdated. I know @dceejay has knowledge in this area - hopefully he can chime in.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [1 February 2024 09:01 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/4 "2024-02-01T09:01:02Z")

</div>

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

[This video](https://www.youtube.com/watch?v=CLz06_Pd4AA) might be relevant.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [1 February 2024 09:14 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/5 "2024-02-01T09:14:59Z")

</div>

> [@Steve-Mcl](#):
>
> There is specific BeagleBone info here: [Running on BeagleBone Boards : Node-RED](https://nodered.org/docs/getting-started/beaglebone) but i fear is it outdated

From the video [at 2m 27s](https://www.youtube.com/watch?v=CLz06_Pd4AA&t=147s) - "Except that this is all nonsense" 🤣

An update to the docs would be nice!

---

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [2 February 2024 00:51 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/6 "2024-02-02T00:51:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [5 February 2024 01:48 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/7 "2024-02-05T01:48:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [5 February 2024 04:28 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/8 "2024-02-05T04:28:42Z")

</div>

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

Open a terminal:

```auto
cd .node-red
node-red-status

```

What do you get?

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

---

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [5 February 2024 13:20 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/9 "2024-02-05T13:20:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 February 2024 13:28 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/10 "2024-02-05T13:28:37Z")

</div>

> [@Pitufo](#):
>
> I found this command to install npm
> 
> # apt install nodejs npm
> 
> root@BeagleBone:~# node -v  
> v12.22.12

As mentioned earlier, that is too old

> [@Steve-Mcl](#):
>
> > [@Pitufo](#):
> >
> > root@BeagleBone:~# node -v  
> > v12.22.12
> 
> Node version is too old (I recommend V18 LTS - it is still in support and i find it is more supported than v20)

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

> [@jbudd](#):
>
> [This video](https://www.youtube.com/watch?v=CLz06_Pd4AA) might be relevant.

---

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [7 February 2024 04:10 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/11 "2024-02-07T04:10:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [14 February 2024 02:24 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/12 "2024-02-14T02:24:42Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 February 2024 09:41 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/13 "2024-02-14T09:41:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pitufo](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@Pitufo](https://discourse.nodered.org/u/Pitufo)\
**Post date:** [14 February 2024 13:04 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/14 "2024-02-14T13:04:26Z")

</div>

Thanks

I will do so.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [28 February 2024 13:04 UTC](https://discourse.nodered.org/t/installing-johnny5-in-node-red-on-beaglebone-npm-command-not-found/85106/15 "2024-02-28T13:04:43Z")

</div>

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