Hallo zusammen ,
ich müsste meine Node-Version Updaten ...
Zitatpi@raspberrypi:~ $ sudo npm -g outdated
Package Current Wanted Latest Location Depended by
corepack 0.17.0 0.24.1 0.24.1 node_modules/corepack global
npm 9.8.1 10.4.0 10.4.0 node_modules/npm global
npm notice
npm notice New major version of npm available! 9.8.1 -> 10.4.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.4.0
npm notice Run npm install -g npm@10.4.0 to update!
npm notice
pi@raspberrypi:~ $ ^C
pi@raspberrypi:~ $ sudo npm install -g npm@10.4.0
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@10.4.0
npm ERR! notsup Not compatible with your version of node/npm: npm@10.4.0
npm ERR! notsup Required: {"node":"^18.17.0 || >=20.5.0"}
npm ERR! notsup Actual: {"npm":"9.8.1","node":"v16.20.2"}
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-02-03 T14_09_05_979Z-debug-0.log
pi@raspberrypi:~ $ node -v
v16.20.2
pi@raspberrypi:~ $ npm -v
9.8.1
Wenn ich dies mit
Zitatcurl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
mache , bekomme ich folgende Fehlermeldung :
Zitatnode: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by node)
Was mache ich falsch ??
Danke
Ohne Angabe des eingesetzten OS ist eine vernünftige Antwort schwierig.
Viele Grüße
Jürgen
Das stimmt ,hatte ich vergessen
Zitatpi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Zitatpi@raspberrypi:~ $ npm -v
9.8.1
Zitatpi@raspberrypi:~ $ node -v
v16.20.2
Weil du auf buster bist: Probier mal Node v18.
Scheint mit v20 Probleme zu geben (siehe hier (https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjykqj8jZCEAxXAhP0HHR6YBjcQFnoECBAQAQ&url=https%3A%2F%2Fgithub.com%2Fhomebridge%2Fhomebridge%2Fissues%2F3453&usg=AOvVaw02ADyTlWXjLIa0zRgLLvJC&opi=89978449)).
Vielleicht gibt es irgendeinen wilden Weg doch v20 draufzukriegen, das macht dir im Zweifel aber nur in der Zukunft das Leben schwer.
Ansonsten: OS Update schadet auch nicht ... Dann kommst du auch direkt auf 20.