NEWS
Node Version > 16 -> NPM-Probleme [gelöst]
-
Hallo zusammen,
ich habe Probleme mit node, wenn ich eine Version > 16.x installiere. Jeder Versuch npm install... auszuführen führt zu folgender Fehlermeldung:
npm ERR! Cannot read properties of undefined (reading 'isStream')
Ich habe schon alles probiert: node 20, node 18, komplett alles deinstalliert, alle node und npm Ordner gelöscht -> ohne Erfolg. Zuletzt war ich bei:
node -v
v18.17.1
npm -v
9.6.7Sobald ich aber auf Version 16 zurückgehe...
sudo apt remove nodejs
curl -s https://deb.nodesource.com/setup_16.x | sudo bash
sudo apt install -y nodejs
node -v
v16.20.2
npm -v
8.19.4...funtioniert npm wieder.
Vielleicht habt ihr eine Idee?
-
Erstmal schauen ob deine nodejs-Installation 'senkrecht' ist.
Kannst du mit dem Skript aus meiner Signatur machen. -
Danke. Habe ich gemacht. Folgende Ausgabe:
ioBroker nodejs fixer 2023-10-03
Recommended nodejs-version is: 18.18.0
Checking your installation now. Please be patient!
Your current setup is:
/usr/bin/nodejs v16.20.2
/usr/bin/node v16.20.2
/usr/bin/npm 8.19.4
/usr/bin/npx 8.19.4
/usr/bin/corepack 0.17.0
We found these nodejs versions available for installation:
nodejs:
Installed: 16.20.2-deb-1nodesource1
Candidate: 16.20.2-deb-1nodesource1
Version table:
*** 16.20.2-deb-1nodesource1 500
500 https://deb.nodesource.com/node_16.x focal/main amd64 Packages
100 /var/lib/dpkg/status
10.19.0~dfsg-3ubuntu1.1 500
500 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
500 http://de.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages
10.19.0~dfsg-3ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Nothing to do - Your installation is using the correct paths.
You are running nodejs v16.20.2. Do you want to install recommended version 18.18.0?
Press <y> to continue or any other key to quit
Trying to fix your installation now. Please be patient.
Und dann bin ich geduldig...
Aber keine weiteren Ausgaben... kein Prompt...
Warte... 1 Minute... 2 Minuten... Immer noch keine Ausgaben und kein Prompt... Hmm... -
@styrx sagte in Node Version > 16 -> NPM-Probleme:
Warte...
Das Skript legt dir eine richtige nodesource.list für nodejs18 an. Und biegt im Hintergrund noch etwas gerade. Das kann je nach Umfang und Leistung des Computers schon etwas dauern.
-
@thomas-braun
Okay. Ist durchgelaufen. Nach dem Reboot:ioBroker nodejs fixer 2023-10-03
Recommended nodejs-version is: 18.18.0
Checking your installation now. Please be patient!
Your current setup is:
/usr/bin/nodejs v18.18.0
/usr/bin/node v18.18.0
/usr/bin/npm 9.8.1
/usr/bin/npx 9.8.1
/usr/bin/corepack 0.19.0
We found these nodejs versions available for installation:
nodejs:
Installed: 18.18.0-1nodesource1
Candidate: 18.18.0-1nodesource1
Version table:
*** 18.18.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
100 /var/lib/dpkg/status
18.17.1-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.17.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.16.1-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.16.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.15.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.14.2-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.14.1-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.14.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.13.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.12.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.11.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.10.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.9.1-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.9.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.8.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.7.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.6.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.5.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.4.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.3.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.2.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.1.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
18.0.0-1nodesource1 1001
500 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages
10.19.0~dfsg-3ubuntu1.1 500
500 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
500 http://de.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages
10.19.0~dfsg-3ubuntu1 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Nothing to do - Your installation is using the correct paths.
Nothing to do - Your version is the recommended one.
You can now keep your whole system up-to-date using the usual 'sudo apt update && sudo apt full-upgrade' commands.
Please DO NOT USE node version managers like 'nvm', 'n' and others in parallel. They will break your current installation!
Perfekt!
NPM läuft wieder.Und...
npm install -g npm@10.2.0
...läuft endlich auch durch.
node -v
v18.18.0
npm -v
10.2.0Vielen Dank!
-
@styrx sagte in Node Version > 16 -> NPM-Probleme [gelöst]:
npm install -g npm@10.2.0
NEIN! Frickel dir den Kram doch nicht direkt wieder kaputt!
npm kommt immer mit dem Paket nodejs in passender Version mit, da wird nichts am Paketmanager vorbei in das System gekloppt.
Das führt nämlich genau zu den Problemen!/usr/bin/npm 9.8.1
Ist genau die passende Version zu nodejs 18.18.0.
-
@styrx sagte in Node Version > 16 -> NPM-Probleme [gelöst]:
Nothing to do - Your installation is using the correct paths.
Nothing to do - Your version is the recommended one.Warum vertraust du den Meldungen nicht?
Nothing to do = Fummel da nicht weiter dran herum. -
@thomas-braun
Okay. Hab's wieder zurückgesetzt:npm install -g npm@9.8.1
npm -v9.8.1
-
@styrx sagte in Node Version > 16 -> NPM-Probleme [gelöst]:
npm install -g npm@9.8.1
Vergiss den Mist. npm wird nie so angelegt.
sudo apt install --reinstall nodejs
-
@thomas-braun
Okay, hab ich gemacht. -
@styrx sagte in Node Version > 16 -> NPM-Probleme [gelöst]:
Hallo zusammen,
ich habe Probleme mit node, wenn ich eine Version > 16.x installiere. Jeder Versuch npm install... auszuführen führt zu folgender Fehlermeldung:
npm ERR! Cannot read properties of undefined (reading 'isStream')
Ich habe schon alles probiert: node 20, node 18, komplett alles deinstalliert, alle node und npm Ordner gelöscht -> ohne Erfolg. Zuletzt war ich bei:
node -v
v18.17.1
npm -v
9.6.7Sobald ich aber auf Version 16 zurückgehe...
sudo apt remove nodejs
curl -s https://deb.nodesource.com/setup_16.x | sudo bash
sudo apt install -y nodejs
node -v
v16.20.2
npm -v
8.19.4...funtioniert npm wieder.
Vielleicht habt ihr eine Idee?
Kann das sein, das es daran liegt dass Node V16 nicht mehr verfügbar ist?
V16 wurde wohl Anfang September zu "End of life" erklärt.@Thomas-Braun Du hast doch so ein super Scipt gebaut Link Text, kannst du so etwas auch für die V16 machen?
Auf meine Multihost habe ich seit V18 nur Probleme. Meine wichtigsten Adapter (S7 & ESPHome) laufen nicht mehr.
Master ist ein LCX V18, Slave Pi mit V16. Alles andere scheint zu laufen.VG
Axel -
@axel-koeneke sagte in Node Version > 16 -> NPM-Probleme [gelöst]:
kannst du so etwas auch für die V16 machen?
Setz einfach die gewünschte Version hinter das Skript
Also./skriptname 16
Und für die Adapter bitte Issues anlegen, auf abgekündigten Versionen verharren ist keine Option. Die v16 ist aus Sicherheitsgründen angekündigt worden.