Hallo ,
bei einem heutigen Update funktioniert ein Update von "npm" nicht
Zitatpi@raspberrypi:~ $ sudo npm -g outdated
Package Current Wanted Latest Location Depended by
corepack 0.17.0 0.23.0 0.23.0 node_modules/corepack global
npm 9.8.1 10.2.4 10.2.4 node_modules/npm global
pi@raspberrypi:~ $ sudo npm install -g npm@10.2.4
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: npm@10.2.4
npm ERR! notsup Not compatible with your version of node/npm: npm@10.2.4
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/2023-11-16T14_49_57_702Z-debug-0. log
Ich weiß aber nicht was falsch ist
Zitatpi@raspberrypi:~ $ node --version
v16.20.2
pi@raspberrypi:~ $ npm --version
9.8.1
Die beiden relevanten Zeilen im Log sind:
npm ERR! notsup Required: {"node":"^18.17.0 || >=20.5.0"}
npm ERR! notsup Actual: {"npm":"9.8.1","node":"v16.20.2"}
Required = npm Version 10.2.4 benötigt entweder node 18.17.0(.x) oder eine Version größer gleich 20.5.0.
Actual = Du hast aktuell nur node 16.20.2 installiert.
Lösung ist einfach node updaten, gibt genug Anleitungen im Netz dazu.
Hoffe das hilft!
Danke 8)