Open matbe81 opened 2 years ago
Describe The Bug: Error while upgrading to NodeJS 18
To Reproduce:
Expected behavior:
Logs:
sudo hb-service update-node [sudo] password for mathieu: ℹ Updating Node.js from v16.17.1 to v18.12.0... ℹ Updating from NodeSource... ## Installing the NodeSource Node.js 18.x repo... ## Populating apt-get cache... + apt-get update Hit:1 http://be.archive.ubuntu.com/ubuntu focal InRelease Get:2 http://be.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:3 http://be.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB] Get:4 http://be.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB] Hit:5 https://deb.nodesource.com/node_16.x focal InRelease Get:6 http://be.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,1 96 kB] Fetched 2,532 kB in 2s (1,419 kB/s) Reading package lists... Done ## Confirming "focal" is supported... + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/focal/Relea se' ## Your distribution, identified as "focal", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for sup port ✖ Failed to update Node.js: Command failed: curl -sL https://deb.nodesource.com/ setup_18.x | bash - mathieu@homebridge:~$ sudo hb-service update-node ℹ Updating Node.js from v16.17.1 to v18.12.0... ℹ Updating from NodeSource... ## Installing the NodeSource Node.js 18.x repo... ## Populating apt-get cache... + apt-get update Hit:1 https://deb.nodesource.com/node_16.x focal InRelease Hit:2 http://be.archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://be.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://be.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:5 http://be.archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done ## Confirming "focal" is supported... + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_18.x/dists/focal/Relea se' ## 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 18.x repo... + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesourc e.com/node_18.x focal main' > /etc/apt/sources.list.d/nodesource.list + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodes ource.com/node_18.x focal main' >> /etc/apt/sources.list.d/nodesource.list ## Running `apt-get update` for you... + apt-get update Get:1 https://deb.nodesource.com/node_18.x focal InRelease [4,583 B] Hit:2 http://be.archive.ubuntu.com/ubuntu focal InRelease Get:3 https://deb.nodesource.com/node_18.x focal/main amd64 Packages [775 B] Hit:4 http://be.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:5 http://be.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:6 http://be.archive.ubuntu.com/ubuntu focal-security InRelease Fetched 5,358 B in 1s (9,148 B/s) Reading package lists... Done ## Run `sudo apt-get install -y nodejs` to install Node.js 18.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 te e /usr/share/keyrings/yarnkey.gpg >/dev/null echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.co m/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: nodejs 1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. Need to get 28.5 MB of archives. After this operation, 52.4 MB of additional disk space will be used. Get:1 https://deb.nodesource.com/node_18.x focal/main amd64 nodejs amd64 18.12.0 -deb-1nodesource1 [28.5 MB] Fetched 28.5 MB in 10s (2,767 kB/s) (Reading database ... 117910 files and directories currently installed.) Preparing to unpack .../nodejs_18.12.0-deb-1nodesource1_amd64.deb ... Unpacking nodejs (18.12.0-deb-1nodesource1) over (16.17.1-deb-1nodesource1) ... Setting up nodejs (18.12.0-deb-1nodesource1) ... Processing triggers for man-db (2.9.1-1) ... ℹ Rebuilding for Node.js v18.12.0... rebuilt dependencies successfully ✔ Rebuilt homebridge-config-ui-x for Node.js v18.12.0. npm ERR! code 1 npm ERR! path /usr/lib/node_modules/homebridge-solaredge-realtime/node_modules/@serialport/bindings npm ERR! command failed npm ERR! command sh -c -- prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild npm ERR! prebuild-install warn install No prebuilt binaries found (target=18.12.0 runtime=node arch=x64 libc= platform=linux) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@18.12.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3" npm ERR! gyp http GET https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz npm ERR! gyp WARN install got an error, rolling back install npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz failed, reason: getaddrinfo EAI_AGAIN nodejs.org npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14) npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:513:28) npm ERR! gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:494:9) npm ERR! gyp ERR! stack at TLSSocket.emit (node:events:525:35) npm ERR! gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8) npm ERR! gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3) npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) npm ERR! gyp ERR! System Linux 5.4.0-125-generic npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /usr/lib/node_modules/homebridge-solaredge-realtime/node_modules/@serialport/bindings npm ERR! gyp ERR! node -v v18.12.0 npm ERR! gyp ERR! node-gyp -v v9.1.0 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-10-29T10_09_53_548Z-debug-0.log ⚠ Could not rebuild all plugins - check logs. ℹ Restarting Homebridge Service... ✔ Homebridge Restarted
Plugin Config:
Show your Homebridge config.json here, remove any sensitive information.
Screenshots:
Environment:
Describe The Bug: Error while upgrading to NodeJS 18
To Reproduce:
Expected behavior:
Logs:
Plugin Config:
Screenshots:
Environment: