I had an old Sony Vaio desktop PC that had (gasp!) Windows Vista on it. I installed Raspberry Pi Desktop with no issues. Specs are:
Release date: July 1st 2022
System: 32-bit
Kernel version: 5.10
Debian version: 11 (bullseye)
After getting it installed, I was surprised to find that it does not have Node-RED in the program menu. When I tried to install using the script, and adding --node16, I run into the Bad install: Node.js v12.22.12 Npm missing - Exit
Attached is the log file if that helps. I am very clueless when it comes to nodeJS, NPM, etc. In the past, on all my Raspberry Pi's and Debian systems, the script "just works". nodered-install.log (9.1 KB)
Answers should be shown in these screenshots. I do not see a folder called .nvm in the home directory. Only thing there is a folder called sonyvaio that was likely created when I installed the OS and created the username. I do not believe I am using a node manager like nvm or n.
Please copy/paste text where possible, by posting a screenshot I cannot copy the relevant bits for commenting on.
The fact that al shows v12 is very strange.
Have a look in /etc/apt/sources.list and see if there is any reference to the nodesource repository. If there is then delete it, or initially copy/paste the file as it is for us to comment on. Also check that there is a file /etc/apt/sources.d/nodesource.list and copy/paste the contents here.
Then run sudo apt update
and apt policy nodejs
and paste the output from both here.
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main
# Uncomment lines below then 'apt-get update' to enable 'apt-get source'
# deb-src http://deb.debian.org/debian bullseye main contrib non-free
# deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
# deb-src http://deb.debian.org/debian bullseye-updates main
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
(there is also a file called source.list.save)
In the folder /etc/apt/sources.list.d are two files (nodesource.list and nodesource.list.save). Content of each is as follows:
nodesource.list
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
nodesource.list.save
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
There is / was no file called /etc/apt/sources.d/nodesource.list (the .d being the difference of what I posted above)
I then deleted /etc/apt/sources.list.d/nodesource.list and /etc/apt/sources.list.d/nodesource.list.save and ran the commands you listed.
Output from sudo apt update
sonyvaio@raspberry:/home $ sudo apt update
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:4 http://deb.debian.org/debian bullseye-updates InRelease
Ign:5 http://ppa.launchpad.net/peek-developers/stable/ubuntu kinetic InRelease
Err:6 http://ppa.launchpad.net/peek-developers/stable/ubuntu kinetic Release
404 Not Found [IP: 185.125.190.52 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/peek-developers/stable/ubuntu kinetic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
(the peek program was what I installed to create some screenshots)
My error, it should be /etc/apt/sources.list.d/nodesource.list, as you correctly worked out.
Why? It is that file that pulls in nodejs 16.
That is at least part of the problem. It can't find that repository. Though I don't understand where it is coming from, as it doesn't appear in sources.list or sources.list.d
Whatever you did to install peek is messing things up. You need to get to a position where sudo apt update
works without throwing an error, and then run the install script again.
Thank you. I only installed peek this morning (well after my original post), but I agree that that is not helping.
You have all given me enough to run with. The OS install only took < 10 minutes, so I am going to blow it away and start with a fresh install, then make sure sudo apt update does not throw any errors.
There is an un-official build - that the script should try to install...
the relevant commands the script runs (having uninstalled and remove node12) are
curl -sSL -o /tmp/node.tgz https://unofficial-builds.nodejs.org/download/release/v16.16.0/node-v16.16.0-linux-x86.tar.gz
# unpack it into the correct places
mkdir -p /tmp/nodejs
sudo tar -zxof /tmp/node.tgz --strip-components=1 -C /tmp/nodejs
sudo chown -R root:root /tmp/nodejs
sudo cp -PR /tmp/nodejs/* /usr
# remove the download
rm /tmp/node.tgz
Which should get node16 installed
If that works (ie node -v reports 16) then maybe run the script (without the extra --nodexx parameter as the script should then leave the installed version in place)
Node-RED appears to have been installed correctly. Thank you!
Running Node-RED update for user sonyvaio at /home/sonyvaio on debian
This can take 20-30 minutes on the slower Pi versions - please wait.
Stop Node-RED ✔
Remove old version of Node-RED ✔
Node option not specified : --node14, --node16, or --node18
Leave existing Node.js : v16.16.0 Npm 8.11.0
Clean npm cache -
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Install Node-RED core ✔ 3.0.0
Move global nodes to local -
Leave existing nodes -
Install extra Pi nodes -
Add shortcut commands ✔
Update systemd script ✔
Any errors will be logged to /var/log/nodered-install.log
All done.
You can now start Node-RED with the command node-red-start
or using the icon under Menu / Programming / Node-RED
Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880
Started : Sun 17 Jul 2022 06:51:48 PM EDT
Finished: Sun 17 Jul 2022 06:52:31 PM EDT
You may want to run node-red admin init
to configure your initial options and settings.