Hallo ich habe folgendes gemacht, weil ein Plugin Updates von NPM und Node.js verlangt hat :
pi@raspberrypi:~ $ sudo npm outdated -g
Package Current Wanted Latest Location
homebridge-broadlink-rm 2.5.16 2.7.4 3.5.5
homebridge-tado-ac 2.3.4 2.3.5 2.3.5
homebridge-wol 3.1.0 3.2.4 3.2.4
npm 5.6.0 5.10.0 6.1.0
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo npm update -g
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
added 131 packages, removed 42 packages, updated 120 packages and moved 3 packages in 69.517s
Nun bekomme ich bei allen NPM Befehlen diesen Error :
pi@raspberrypi:~ $ sudo npm outdated -g
module.js:540
throw err;
^
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:22:13
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:143:3)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
Ich will aber NPM und Node.JS updaten, geht nun aber nicht mehr, weil bei NPM keine Befehle mehr gehen wegen diesem Fehler. Ich kenne mich mit Linux nicht so gut aus, würde mich über jede Hilfe sehr freuen. Danke
Homebridge stürzt immer ab nach ein paar Minuten. Ich glaube weil ein Plugin die neusten Versionen braucht oder weil NPM und node.js nun nicht mehr richtig gehen.
***EDIT*** habe etwas gegoogled und nun das Verzeichnis NPM unter /usr/local/lib/node_modules gelöscht und node neu installiert nun ist der Fehler weg und NPM geht wieder.
Allerdings stimmt noch etwas nicht. Alle paar Minuten stürzt Homebridge ab. Alle Geräte reagieren nicht mehr. Aber der Errorlog und der log zeigen keinen Fehler...
Ich habe nun NPM 6.1.0 und node 8.9.4