# Problem with "get started" bash command on "fresh" Raspian on Raspi3, while two Raspi2 work

**URL:** <https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407>\
**Category:** General\
**Created:** [25 June 2023 18:53 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407 "2023-06-25T18:53:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [25 June 2023 18:53 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/1 "2023-06-25T18:53:25Z")

</div>

After issues with the SD cards on the running Raspis I decided to change the SD-cards and put the newest Raspian on the Raspis.

This worked for two Raspi 2, but failed repeatedly for a Raspi 3 Model B Vi.2.

The bash command stops at "Install Node.js for Armv6" and claims invalid version for Node.js and npm. I tried several ways to fix it, but was not successful. The bash command always failed, with then different messages.

As I repeated the procedure 3 times with different SD-cards I assume a systematic issue.

---

<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:** [25 June 2023 19:03 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/2 "2023-06-25T19:03:42Z")

</div>

What operating system do you have on the Pis?

Can you try specifying node.js v16 by running these commands?  
Post the output here.

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

```

---

<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:** [25 June 2023 20:34 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/3 "2023-06-25T20:34:58Z")

</div>

Also check that this command runs successfully  
`sudo apt update && sudo apt full-upgrade`  
If that does anything then run the script again. If it still fails post the install log here, /var/log/nodered-install.log

---

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [25 June 2023 20:46 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/4 "2023-06-25T20:46:47Z")

</div>

Thanks !

> operating system  
> $cat /etc/\*release  
> PRETTY\_NAME="Raspbian GNU/Linux 11 (bullseye)"  
> NAME="Raspbian GNU/Linux"  
> VERSION\_ID="11"  
> VERSION="11 (bullseye)"  
> VERSION\_CODENAME=bullseye  
> ID=raspbian  
> ID\_LIKE=debian  
> HOME\_URL="[http://www.raspbian.org/](http://www.raspbian.org/)"

@jbudd : your proposal of the bash command with "--node16" worked perfectly !

@Colin : Everything was up to date, nothing was updated

Now also the Raspi 3 Model B works again. I wonder, what goes wrong in the proposed bash command ?

Thanks again !

---

<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:** [26 June 2023 06:16 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/5 "2023-06-26T06:16:12Z")

</div>

> [@Ekki\_b](#):
>
> I wonder, what goes wrong in the proposed bash command ?

If you post the failing install log then it may become clearer.

---

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [27 June 2023 04:05 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/6 "2023-06-27T04:05:24Z")

</div>

@Colin

nodered-install.log :  
"  
Versions: node:v12.22.12 npm:missing  
Already have nodejs v12.22.12  
OLD nodejs 12 :  
NEW nodejs :  
Nodejs 12 too old and new version not specified - exiting  
"

In the script there is mentioned :

"node.js ... It can optionally install node 12, 14, 16 or 18 LTS for you."

The script did install node 12 and then stated, node 12 is not good for Node-RED. I assume, the script did not find the hardware of my Pi 3 and then defaulted to node 12. Default to node 16 would not cause trouble, ;-).

The installation of node 12 should be removed from the script. The default for not identified HW should be increased to node 16. In another part of the script you find

"You can force an install of node 14, 16 or 18 by using ..."

Version 14 would have been o.k. , but not optimum.

Maybe it is also a good idea to log the options, which were used when calling the script. Easiest would be to log the complete command line.

---

<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:** [27 June 2023 07:05 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/7 "2023-06-27T07:05:51Z")

</div>

> [@Ekki\_b](#):
>
> The bash command stops at "Install Node.js for Armv6" and claims invalid version for Node.js and npm. I tried several ways to fix it, but was not successful. The bash command always failed, with then different messages.

The key thing is exactly what that error message said. Ideally it should tell you to run the command with the parameter to install a valid version.

---

<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:** [27 June 2023 07:05 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/8 "2023-06-27T07:05:55Z")

</div>

> [@Ekki\_b](#):
>
> The script did install node 12 and then stated, node 12 is not good for Node-RED.

Actually you already had nodejs 12.22 installed. The script (on this run at least) did not install node.js  
It should have given quite a helpful message, though you didn't post that bit.

```auto
"Nodejs 12 too old and new version not specified - exiting" 
"Node-RED v3.x no longer supports Nodejs 12 "

" You can force an install of node 14, 16 or 18 by using the --node14, --node16 or --node18 parameter."
" However doing so may break some nodes that may need re-installing manually."
" Generally it is recommended to update all nodes to their latest versions before upgrading."

```

It would be interesting to know how 12.22 came to be installed. Did you install Raspbian Lite, Desktop or Desktop with Recommended Software?

---

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [29 June 2023 06:58 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/9 "2023-06-29T06:58:16Z")

</div>

@jbudd , @Colin

> [@jbudd](#):
>
> Did you install Raspbian Lite, Desktop or Desktop with Recommended Software?

I use a different installer, which does not offer these choices. In the past I always used "simple" desktop, without recommended software. Installing the recommended software caused much pain.

I use the Raspberry Pi Imager v1.7.5 on a Mac

I chose Raspberry Pi OS (32-bit)  
A port of Debian Bullseye with Raspberry Pi Desktop (Recommended)  
Published : 2023-05-03

As I made several tries I don't remember everything I did. I can not exclude that, in my desperation, tried to install nodejs in one or the other case. I definitely also removed nodejs manually. Anyhow : the script should detect the old nodejs version and offer a fix, rather than to simpy "exit". On request the script could remove the old nodejs version and install the most recent stable version.

I don't think it is of any use to repeat the exercise on a virgin SD-card to get the full log for rpi3.

---

<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:** [29 June 2023 07:23 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/10 "2023-06-29T07:23:16Z")

</div>

> [@Ekki\_b](#):
>
> the script should detect the old nodejs version and offer a fix, rather than to simpy "exit

It should tell you that you have an old version of nodejs and tell you how to fix it, as mentioned by @jbudd.

---

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [29 June 2023 07:43 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/11 "2023-06-29T07:43:34Z")

</div>

"It should tell you that you have an old version of nodejs and tell you how to fix it, as mentioned by @jbudd."

And exactly this part of the script does not work on my rpi3

---

<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:** [29 June 2023 09:55 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/12 "2023-06-29T09:55:47Z")

</div>

> [@Ekki\_b](#):
>
> nodered-install.log :  
> "  
> Versions: node:v12.22.12 npm:missing  
> Already have nodejs v12.22.12  
> OLD nodejs 12 :  
> NEW nodejs :  
> Nodejs 12 too old and new version not specified - exiting  
> "

Is that the full log? If not then please post the full log.

---

<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:** [29 June 2023 09:58 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/13 "2023-06-29T09:58:18Z")

</div>

@Colin that's exactly what the script would **log** if it finds v12.22.  
The long warning message with suggested fix is printed on the screen but not logged.

Of course you may be looking for something else earlier in the log. 😁

---

<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:** [29 June 2023 12:01 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/14 "2023-06-29T12:01:29Z")

</div>

Ok, thanks for that.  
So @Ekki_b, we don't need the log, the question is, what do you see on screen when you run the script?

---

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [29 June 2023 13:33 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/15 "2023-06-29T13:33:29Z")

</div>

> [@Colin](#):
>
> what do you see on screen when you run the script?

Exactly what is shown in the log : " ... wrong version of nodejs, exit "

As you know, the installation logs are not shown.

I did not bother so far to check the options of the script. That might have given me a hint.

So ... something goes wrong. But there are nice people, who helped me out before i was forced to check the options 🙂

---

<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:** [29 June 2023 14:09 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/16 "2023-06-29T14:09:12Z")

</div>

Can you run the script again please and show us a screenshot of the output, we need to understand why the script is not doing what it should.

---

<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:** [29 June 2023 18:25 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/17 "2023-06-29T18:25:05Z")

</div>

> [@Ekki\_b](#):
>
> > [@Colin](#):
> >
> > what do you see on screen when you run the script?
> 
> Exactly what is shown in the log : " ... wrong version of nodejs, exit

I very much doubt if it shows Exactly what is in the log.  
For example, the screen display should end with "Exiting now" while the log contains "exiting".  
Accuracy is important when reporting software glitches.

FWIW there is code in the script which, if node.js V12 is found, prints another message if the minor version is \<= 17.  
It would probably be a good idea to remove this code.

Does anyone know whether RPiOS with recommended software still installs node.js 12.22?

Was there a pressing reason to make the choice of node version non-interactive? - a conflict with other software maybe?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 June 2023 20:55 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/18 "2023-06-29T20:55:46Z")

</div>

> [@jbudd](#):
>
> non-interactive

Main reason was so the script itself could be called by another script if required, so it could run without requiring user input.

---

<div class="post-metadata">

**Author:** ![Ekki\_b](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekki_b/32/15573_2.png) [@Ekki\_b](https://discourse.nodered.org/u/Ekki_b)\
**Post date:** [30 June 2023 17:22 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/19 "2023-06-30T17:22:17Z")

</div>

Thanks to all.  
Next time I have this kind of trouble I will take a screenshot with the error message and provide the full log. This should help to better understand what happened. The script definitely installed a version 12 nodejs installation and then complained about the old version.

---

<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:** [30 June 2023 20:30 UTC](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407/20 "2023-06-30T20:30:32Z")

</div>

> [@Ekki\_b](#):
>
> The script definitely installed a version 12 nodejs installation

If it did that it would be in the install log.  
I note that the bullseye raspbian repository has nodejs 12.22.12. That means that either nodejs was installed by default, or somehow the command  
`sudo apt install nodejs`  
was run before the node-red script was run.  
The fact that the script ran ok on two of your pis means that there was something different about the system on third one before the script was run.

[Next page](https://discourse.nodered.org/t/problem-with-get-started-bash-command-on-fresh-raspian-on-raspi3-while-two-raspi2-work/79407.md?page=2)
