NEWS
[How-to] Node.js ioBroker richtig updaten-2021/22 Edition
-
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
sudo apt remove node*
Jetzt hat es geklappt aber irgendwie hab ich trotzdem noch die alte Node Version:
dicken@iobroker-produktiv:~$ curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash - ## Installing the NodeSource Node.js 12.x repo... ## Populating apt-get cache... + apt-get update Hit:1 https://deb.nodesource.com/node_12.x groovy InRelease Hit:2 http://archive.ubuntu.com/ubuntu groovy InRelease Hit:3 http://archive.ubuntu.com/ubuntu groovy-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu groovy-security InRelease Reading package lists... Done ## Confirming "groovy" is supported... + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/groovy/Release' ## Adding the NodeSource signing key to your keyring... + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null ## Creating apt sources list file for the NodeSource Node.js 12.x repo... + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_12.x groovy main' > /etc/apt/sources.list.d/nodesource.list + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_12.x groovy main' >> /etc/apt/sources.list.d/nodesource.list ## Running `apt-get update` for you... + apt-get update Hit:1 http://archive.ubuntu.com/ubuntu groovy InRelease Hit:2 https://deb.nodesource.com/node_12.x groovy InRelease Hit:3 http://archive.ubuntu.com/ubuntu groovy-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu groovy-security InRelease Reading package lists... Done ## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm ## You may also need development tools to build native addons: sudo apt-get install gcc g++ make ## To install the Yarn package manager, run: curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn
dicken@iobroker-produktiv:~$ sudo apt-get install -y nodejs Reading package lists... Done Building dependency tree Reading state information... Done nodejs is already the newest version (12.22.7-deb-1nodesource1). The following packages were automatically installed and are no longer required: gyp javascript-common libauthen-sasl-perl libc-ares2 libclone-perl libdata-dump-perl libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl libio-stringy-perl libipc-system-simple-perl libjs-inherits libjs-is-typedarray libjs-psl libjs-typedarray-to-buffer liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libssl-dev libtie-ixhash-perl libtimedate-perl libtry-tiny-perl liburi-perl libuv1-dev libwww-perl libwww-robotrules-perl libx11-protocol-perl libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl perl-openssl-defaults xdg-utils Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. dicken@iobroker-produktiv:~$ node -v v12.20.0
-
@dicken sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
sudo apt autoremove sudo apt remove node* sudo apt update sudo apt policy nodejs
-
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
@dicken sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
sudo apt autoremove sudo apt remove node* sudo apt update sudo apt policy nodejs
läuft alles wunderbar durch aber node -v sagt was von v12.20.0
dicken@iobroker-produktiv:~$ sudo apt policy nodejs nodejs: Installed: (none) Candidate: 12.22.7-deb-1nodesource1 Version table: 12.22.7-deb-1nodesource1 500 500 https://deb.nodesource.com/node_12.x groovy/main amd64 Packages 12.18.2~dfsg-1ubuntu2 500 500 http://archive.ubuntu.com/ubuntu groovy/universe amd64 Packages dicken@iobroker-produktiv:~$ node -v v12.20.0
-
@dicken sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
nodejs: Installed: (none)
Das ist nicht installiert.
sudo apt install nodejs
Und du musst da auch noch von Hand dran rumgefrickelt haben.
v12.20.0 kann nicht über ein Repo gekommen sein.Test:
sudo ln -s /usr/bin/node /usr/bin/nodejs which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs
-
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
Und du musst da auch noch von Hand dran rumgefrickelt haben.
v12.20.0 kann nicht über ein Repo gekommen sein.Ja das mag sein, zu meinen Anfängen mit iobroker.
dicken@iobroker-produktiv:~$ sudo apt install nodejs Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/18.0 MB of archives. After this operation, 93.6 MB of additional disk space will be used. Selecting previously unselected package nodejs. (Reading database ... 32341 files and directories currently installed.) Preparing to unpack .../nodejs_12.22.7-deb-1nodesource1_amd64.deb ... Unpacking nodejs (12.22.7-deb-1nodesource1) ... Setting up nodejs (12.22.7-deb-1nodesource1) ... Processing triggers for man-db (2.9.3-2) ... dicken@iobroker-produktiv:~$ node -v v12.20.0 dicken@iobroker-produktiv:~$ ^C dicken@iobroker-produktiv:~$ sudo apt policy nodejs nodejs: Installed: 12.22.7-deb-1nodesource1 Candidate: 12.22.7-deb-1nodesource1 Version table: *** 12.22.7-deb-1nodesource1 500 500 https://deb.nodesource.com/node_12.x groovy/main amd64 Packages 100 /var/lib/dpkg/status 12.18.2~dfsg-1ubuntu2 500 500 http://archive.ubuntu.com/ubuntu groovy/universe amd64 Packages dicken@iobroker-produktiv:~$ node -v v12.20.0
Immernoch 12.20.0
-
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
Test:
sudo ln -s /usr/bin/node /usr/bin/nodejs which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs
dicken@iobroker-produktiv:~$ sudo ln -s /usr/bin/node /usr/bin/nodejs dicken@iobroker-produktiv:~$ which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs /usr/bin/nodejs /usr/local/bin/node /usr/local/bin/npm v12.22.7 v12.20.0 6.14.8 Hit:1 http://archive.ubuntu.com/ubuntu groovy InRelease Hit:2 http://archive.ubuntu.com/ubuntu groovy-updates InRelease Hit:3 http://archive.ubuntu.com/ubuntu groovy-security InRelease Hit:4 https://deb.nodesource.com/node_12.x groovy InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. Hit:1 http://archive.ubuntu.com/ubuntu groovy InRelease Hit:2 http://archive.ubuntu.com/ubuntu groovy-updates InRelease Hit:3 https://deb.nodesource.com/node_12.x groovy InRelease Hit:4 http://archive.ubuntu.com/ubuntu groovy-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. nodejs: Installed: 12.22.7-deb-1nodesource1 Candidate: 12.22.7-deb-1nodesource1 Version table: *** 12.22.7-deb-1nodesource1 500 500 https://deb.nodesource.com/node_12.x groovy/main amd64 Packages 100 /var/lib/dpkg/status 12.18.2~dfsg-1ubuntu2 500 500 http://archive.ubuntu.com/ubuntu groovy/universe amd64 Packages dicken@iobroker-produktiv:~$ node -v v12.20.0
-
@dicken sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
apt policy nodejs
Hatte ich geschrieben, dass das mit sudo eingeleitet wird?
Immernoch 12.20.0
Falsche Pfade vom händischen Gefrickel.
sudo ln -s /usr/bin/node /usr/bin/nodejs sudo rm /usr/local/bin/node sudo rm /usr/local/bin/npm sudo reboot
-
dicken@iobroker-produktiv:~$ sudo ln -s /usr/bin/node /usr/bin/nodejs ln: failed to create symbolic link '/usr/bin/nodejs': File exists
Ok versteh ich, hab ich ja eben schon gemacht den Befehl aber der zweite geht nicht:
dicken@iobroker-produktiv:~$ sudo rm -/usr/local/bin/node rm: invalid option -- '/' Try 'rm --help' for more information.
vermutlich "sudo rm /usr/local/bin/node" ? (also ohne den Bindestrich?)
EDIT: Vielen Dank Jetzt klappt es
dicken@iobroker-produktiv:~$ node -v v12.22.7
-
Ja, ohne Bindestrich. Da hatte ich überlegt mit einer Option zu arbeiten, dann aber doch wieder gelöscht und den Strich übersehen.
-
Wie sieht
which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs
nun aus?
-
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
Wie sieht
which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs
nun aus?
dicken@iobroker-produktiv:~$ which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt update && apt policy nodejs /usr/bin/nodejs /usr/bin/node /usr/bin/npm v12.22.7 v12.22.7 6.14.15
Das sieht doch gut aus
-
@dicken
Vollständig posten. Alles. Inkl. Eingabezeile. -
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
@dicken
Vollständig posten. Alles. Inkl. Eingabezeile.Hab den vorherigen Beitrag bearbeitet
-
@dicken
Da fehlt immer noch was. -
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
@dicken
Da fehlt immer noch was.Oh, hab nen Fehler in deinem Befehl gefunden, du hast zweimal hintereinander apt update gemacht, das zweite soll ja sicher apt upgrade sein, habs mal angepasst und nochmal durchlaufen lassen:
dicken@iobroker-produktiv:~$ which nodejs node npm && nodejs -v && node -v && npm -v && sudo apt update && sudo apt upgrade && apt policy nodejs /usr/bin/nodejs /usr/bin/node /usr/bin/npm v12.22.7 v12.22.7 6.14.15 [sudo] password for dicken: Hit:1 http://archive.ubuntu.com/ubuntu groovy InRelease Hit:2 https://deb.nodesource.com/node_12.x groovy InRelease Hit:3 http://archive.ubuntu.com/ubuntu groovy-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu groovy-security InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. nodejs: Installed: 12.22.7-deb-1nodesource1 Candidate: 12.22.7-deb-1nodesource1 Version table: *** 12.22.7-deb-1nodesource1 500 500 https://deb.nodesource.com/node_12.x groovy/main amd64 Packages 100 /var/lib/dpkg/status 12.18.2~dfsg-1ubuntu2 500 500 http://archive.ubuntu.com/ubuntu groovy/universe amd64 Packages dicken@iobroker-produktiv:~$
-
@dicken sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
du hast zweimal hintereinander apt update gemacht
Nein, das ist bewusst doppelt.
Aber passt schon.nodejs ist jetzt jedenfalls senkrecht in der richtigen Version im System.
-
@thomas-braun sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
@dicken sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:
du hast zweimal hintereinander apt update gemacht
Nein, das ist bewusst doppelt.
Aber passt schon.nodejs ist jetzt jedenfalls senkrecht in der richtigen Version im System.
Ok, vielen vielen Dank für deine Hilfe
-
Hallo
jedes mal (schon öfter probiert), wenn ich auf nodejs 14 upgrade läuft danach der mihome-vacuum Adapter nicht mehr.
Es läuft alles Reibungslos, bis es ein Befehl von IOBroker kommt... nach einigen Minuten ist er wieder verbunden (manchmal auch länger) und das Spiel geht von vorne los
mit node 12.X lief alles normalAuszug aus dem Log
mihome-vacuum.0 2021-11-18 13:32:51.245 info Map selected create states... mihome-vacuum.0 2021-11-18 13:32:50.686 info settest next timer: not available mihome-vacuum.0 2021-11-18 13:32:50.159 info select standard vacuum protocol.... mihome-vacuum.0 2021-11-18 13:32:50.144 warn No Answer for DeviceModel use model from Config mihome-vacuum.0 2021-11-18 13:32:50.144 warn No Answer for DeviceModel use old one mihome-vacuum.0 2021-11-18 13:32:50.143 warn YOUR DEVICE IS CONNECTED BUT DID NOT ANSWER YET - CONNECTION CAN TAKE UP TO 10 MINUTES - PLEASE BE PATIENT AND DO NOT TURN THE ADAPTER OFF mihome-vacuum.0 2021-11-18 13:32:40.089 info IOT enabled, create state mihome-vacuum.0 2021-11-18 13:32:39.827 info starting. Version 3.3.1 in /opt/iobroker/node_modules/iobroker.mihome-vacuum, node: v14.18.1, js-controller: 3.3.19 host.IOBroker 2021-11-18 13:32:37.671 info instance system.adapter.mihome-vacuum.0 started with pid 14078 host.IOBroker 2021-11-18 13:32:36.632 info Restart adapter system.adapter.mihome-vacuum.0 because enabled host.IOBroker 2021-11-18 13:32:36.631 info instance system.adapter.mihome-vacuum.0 terminated with code NaN () host.IOBroker 2021-11-18 13:32:36.624 warn instance system.adapter.mihome-vacuum.0 terminated due to SIGBUS mihome-vacuum.0 2021-11-18 13:31:26.406 info trigger cleaning segment 17 mihome-vacuum.0 2021-11-18 13:31:16.313 info create state for carpet_mode mihome-vacuum.0 2021-11-18 13:31:15.114 info create states for mop mihome-vacuum.0 2021-11-18 13:31:15.103 info create states for water box mihome-vacuum.0 2021-11-18 13:31:15.087 info change states from State control.fan_power mihome-vacuum.0 2021-11-18 13:31:15.068 info Map selected create states... mihome-vacuum.0 2021-11-18 13:31:14.463 info settest next timer: not available mihome-vacuum.0 2021-11-18 13:31:13.932 info select standard vacuum protocol.... mihome-vacuum.0 2021-11-18 13:31:13.815 info IOT enabled, create state mihome-vacuum.0 2021-11-18 13:31:13.539 info starting. Version 3.3.1 in /opt/iobroker/node_modules/iobroker.mihome-vacuum, node: v14.18.1, js-controller: 3.3.19
mihome-vacuum.0 | 2021-11-18 12:49:49.814 | info | Map selected create states... -- | -- | -- | -- mihome-vacuum.0 | 2021-11-18 12:49:49.125 | info | settest next timer: not available mihome-vacuum.0 | 2021-11-18 12:49:48.595 | info | select standard vacuum protocol.... mihome-vacuum.0 | 2021-11-18 12:49:48.569 | warn | No Answer for DeviceModel use model from Config mihome-vacuum.0 | 2021-11-18 12:49:48.568 | warn | No Answer for DeviceModel use old one mihome-vacuum.0 | 2021-11-18 12:49:48.567 | warn | YOUR DEVICE IS CONNECTED BUT DID NOT ANSWER YET - CONNECTION CAN TAKE UP TO 10 MINUTES - PLEASE BE PATIENT AND DO NOT TURN THE ADAPTER OFF mihome-vacuum.0 | 2021-11-18 12:49:38.508 | info | IOT enabled, create state mihome-vacuum.0 | 2021-11-18 12:49:38.255 | info | starting. Version 3.3.1 in /opt/iobroker/node_modules/iobroker.mihome-vacuum, node: v14.18.1, js-controller: 3.3.19 host.IOBroker | 2021-11-18 12:49:36.130 | info | instance system.adapter.mihome-vacuum.0 started with pid 6957 host.IOBroker | 2021-11-18 12:49:35.072 | info | Restart adapter system.adapter.mihome-vacuum.0 because enabled host.IOBroker | 2021-11-18 12:49:35.071 | info | instance system.adapter.mihome-vacuum.0 terminated with code NaN () host.IOBroker | 2021-11-18 12:49:35.070 | warn | instance system.adapter.mihome-vacuum.0 terminated due to SIGABRT host.IOBroker | 2021-11-18 12:49:35.063 | error | Caught by controller[0]: free(): invalid pointer mihome-vacuum.0 | 2021-11-18 12:49:15.488 | info | trigger cleaning segment 17 mihome-vacuum.0 | 2021-11-18 12:49:00.086 | info | create state for carpet_mode mihome-vacuum.0 | 2021-11-18 12:48:58.907 | info | create states for mop mihome-vacuum.0 | 2021-11-18 12:48:58.904 | info | create states for water box mihome-vacuum.0 | 2021-11-18 12:48:58.872 | info | change states from State control.fan_power mihome-vacuum.0 | 2021-11-18 12:48:58.839 | info | Map selected create states..
jemand eine Idee?
updated über
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
iobroker fixzusätzlich:
iobroker rebuild ioBroker.mihome-vacuum
iobroker rebuild ioBroker.mihome-vacuum --installund ein rebuild in: opt/iobroker/
und iobroker stop && sudo apt update && sudo apt upgrade -y && iobroker startund in github ein issue aufgemacht, wo ich hierhin verwiesen wurde
und nochmal im DEBUG
mihome-vacuum.0 2021-11-18 13:39:10.415 debug load Map creator... true mihome-vacuum.0 2021-11-18 13:39:10.257 debug Schedule restart: 0 0,1 * * * mihome-vacuum.0 2021-11-18 13:39:10.172 info starting. Version 3.3.1 in /opt/iobroker/node_modules/iobroker.mihome-vacuum, node: v14.18.1, js-controller: 3.3.19 mihome-vacuum.0 2021-11-18 13:39:09.903 debug Plugin sentry Initialize Plugin (enabled=true) mihome-vacuum.0 2021-11-18 13:39:06.008 warn Terminated (UNCAUGHT_EXCEPTION): Without reason mihome-vacuum.0 2021-11-18 13:39:06.007 debug Plugin sentry destroyed mihome-vacuum.0 2021-11-18 13:39:06.006 info terminating mihome-vacuum.0 2021-11-18 13:39:06.005 error Socket Close mihome-vacuum.0 2021-11-18 13:39:05.799 error undefined mihome-vacuum.0 2021-11-18 13:39:05.798 error unhandled promise rejection: undefined mihome-vacuum.0 2021-11-18 13:39:05.798 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). mihome-vacuum.0 2021-11-18 13:39:05.796 debug MIIO Receive Timeout for "app_segment_clean" <<< mihome-vacuum.0 2021-11-18 13:39:04.078 debug Message= {"id":17,"method":"get_multi_maps_list"} mihome-vacuum.0 2021-11-18 13:39:04.077 debug ERROR at setGetSoundVolume: MESSAGE TIMEOUT mihome-vacuum.0 2021-11-18 13:39:04.076 debug MIIO Receive Timeout for "get_sound_volume" <<< mihome-vacuum.0 2021-11-18 13:39:03.794 debug Message= {"id":16,"method":"app_segment_clean","params":[17]} mihome-vacuum.0 2021-11-18 13:39:03.793 info trigger cleaning segment 17 mihome-vacuum.0 2021-11-18 13:39:03.792 debug start Cleaning: 18 MObj: {"command":"cleanSegments","message":"17","from":"system.adapter.mihome-vacuum.0","_id":62189570,"segments":[17],"channels":["mihome-vacuum.0.rooms.73001006380"]} mihome-vacuum.0 2021-11-18 13:39:03.791 debug We are in onMessage:{"command":"cleanSegments","message":{"segments":[17],"channels":["mihome-vacuum.0.rooms.73001006380"]},"from":"system.adapter.mihome-vacuum.0","_id":62189570} mihome-vacuum.0 2021-11-18 13:39:03.784 debug sendTo "cleanSegments" to system.adapter.mihome-vacuum.0 from system.adapter.mihome-vacuum.0 mihome-vacuum.0 2021-11-18 13:39:03.779 debug command: roomClean parent: 73001006380
-
Hab grad auf meinen Windows-Systemen die empfohlene Version "v14.18.1" drauf - bis auf dass die Konsolen danach wie immer nicht mehr gingen, alles gut
-
@backfisch88 Ich glaube der Fehler hier sieht jetzt eher aus wie https://github.com/iobroker-community-adapters/ioBroker.mihome-vacuum/issues/428