Hauptmenü

Node updaten ??

Begonnen von Sky, 03 Februar 2024, 15:14:09

Vorheriges Thema - Nächstes Thema

Sky

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

juemuc

Ohne Angabe des eingesetzten OS ist eine vernünftige Antwort schwierig.

Viele Grüße
Jürgen
3x Sonos Play 1, 1x Sonos Arc + Sub, 1 Sonos-One, 1x Sonos Playbar
FB6690 + FB7490 mit 4x Dect 200 und 3 Dect-ULE-Thermostate,  raspberry3B+, HM Funkmodul HM-MOD-RPI-PCB, HM Klingelsensor HM-Sen-DB-PCB, HM (IP) Fensterkontakte und  Amazon Echo Dot,  piVCCU, pi OS (bookworm).

Sky

#2
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


passibe

Weil du auf buster bist: Probier mal Node v18.
Scheint mit v20 Probleme zu geben (siehe hier).

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.