This a follow-on to the topic
Problem with multiple context stores
Node Red was working ok on that RPi after the upgrade but since I couldn't be sure that the residual node.js v10.24.1 wouldn't cause problems in the future, I decided to just do a completely new install of the OS and Node Red. Everything is working fine on that RPi.
I'm now working on another RPi Node Red installation and have a more interesting problem. Now, even when I use the node red script with the --node16
option, I end up with nodejs v10.24.1, npm v6.14.12
AND Node-Red 2.1.3
I thought nodered v2.1.3
wouldn't install with nodejs v10.xx
...
This can take 20-30 minutes on the slower Pi versions - please wait.
Stop Node-RED ✔
Remove old version of Node-RED ✔
Remove old version of Node.js ✔ v10.24.1
Install Node.js 16 LTS ✔ v10.24.1 Npm 6.14.12
Clean npm cache ✔
Install Node-RED core ✔ 2.1.3
Move global nodes to local -
Npm rebuild 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.
pi@RPi3Bp:~ $ nodejs -v
v10.24.1
pi@RPi3Bp:~ $ npm -v
6.14.12
pi@RPi3Bp:~ $ apt-cache policy nodejs
nodejs:
Installed: 10.24.1-1nodesource1
Candidate: 10.24.1-1nodesource1
Version table:
*** 10.24.1-1nodesource1 500
500 https://deb.nodesource.com/node_10.x buster/main armhf Packages
100 /var/lib/dpkg/status
10.24.0~dfsg-1~deb10u1 500
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
The log shows:
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 https://deb.nodesource.com/node_10.x buster InRelease
Err:2 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
403 Forbidden [IP: 52.35.82.45 443]
Hit:3 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Hit:5 http://packages.azlux.fr/debian buster InRelease
Reading package lists...
E: Failed to fetch https://dl.bintray.com/openhab/apt-repo2/dists/stable/InRelease 403 Forbidden [IP: 52.35.82.45 443]
E: The repository 'https://dl.bintray.com/openhab/apt-repo2 stable InRelease' is no longer signed.
Error executing command, exiting
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.4 MB of archives.
After this operation, 76.7 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_10.x buster/main armhf nodejs armhf 10.24.1-1nodesource1 [14.4 MB]
Fetched 14.4 MB in 3s (4,683 kB/s)
Selecting previously unselected package nodejs.
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Readin$
Preparing to unpack .../nodejs_10.24.1-1nodesource1_armhf.deb ...
Unpacking nodejs (10.24.1-1nodesource1) ...
Setting up nodejs (10.24.1-1nodesource1) ...
Processing triggers for man-db (2.8.5-2) ...
Versions: node:v10.24.1 npm:6.14.12
npm WARN using --force I sure hope you know what you are doing.
Now install Node-RED
/usr/bin/node-red -> /usr/lib/node_modules/node-red/red.js
/usr/bin/node-red-pi -> /usr/lib/node_modules/node-red/bin/node-red-pi
> bcrypt@5.0.1 install /usr/lib/node_modules/node-red/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.0.1/bcrypt_lib-$
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@5.0.1 and node@10.24.1 (node-v64 ABI, glibc) (falling back to source compi$
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.0.1/bcrypt_li$
make: Entering directory '/usr/lib/node_modules/node-red/node_modules/bcrypt/build'
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY Release/nothing.a
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
COPY /usr/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/usr/lib/node_modules/node-red/node_modules/bcrypt/build'
npm WARN notsup Unsupported engine for node-red@2.1.3: wanted: {"node":">=12"} (current: {"node":"10.24.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: node-red@2.1.3
npm WARN notsup Unsupported engine for fs-extra@10.0.0: wanted: {"node":">=12"} (current: {"node":"10.24.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: fs-extra@10.0.0
npm WARN notsup Unsupported engine for node-red-admin@2.2.1: wanted: {"node":">=12"} (current: {"node":"10.24.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: node-red-admin@2.2.1
+ node-red@2.1.3
added 290 packages from 371 contributors in 62.859s
2.1.3
Now create basic package.json for the user and move any global nodes
Running npm rebuild
> protobufjs@6.8.8 postinstall /home/pi/.node-red/node_modules/protobufjs
> node scripts/postinstall
(lots more, but I assume not relavent)
I'm not posting this to get help (unless there is something obvious that I'm doing wrong), I feel I've received more than my share of help on the other topic. Node Red is working on this RPi, and I don't want to do a fresh OS install as there are a number of other packages I have on this RPi.
I'm posting this in case it might show some issues with the script (since I can't find many other posts regarding the script I'm assuming there is something unique about my builds rather than a problem with the script).
I had thought that nodered v 2.xx would not run with node.js v10.xx but it seems to working fine.