homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

node.js out of date #477

Closed acahir closed 1 year ago

acahir commented 1 year ago

Describe The Bug

Similar to #467, I upgraded homebridge-config-ui plugin, and then the webUI was refusing to start with the following error in the logs:

[11/17/2022, 12:23:47 AM] [Homebridge UI] SyntaxError: Unexpected token '?'
[11/17/2022, 12:23:47 AM] Homebridge UI] Caught Unhandled Rejection Error :: Details Below
/usr/local/lib/node modules/homebridge-config-ui-x/node modules/fastify/lib/server.js:38
     const hostPath = listenOptions.path ? [listenOptions.path] : [listenOptions.port ?? 0, listenOptions.host ?? 'localhost']

Checking into it, seems older version of node don't support the ?? operator. Sure enough, node in this docker container is v12:

/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/fastify/lib # node --version                                                         
v12.13.1  

The docker container is up to date, updated both via pulling latest from the registry and by using the Synology package. I've had the docker image set up since 2019, so it seems that the node version isn't being updated from when the container was first created.

Per #467, attempted to update node:

/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/fastify/lib # hb-service update-node                                                 
ℹ Updating Node.js from v12.13.1 to v18.12.1...                                                                                                     
hostname: homebridge: Try again                                                                                                                      
✖ Updating Node.js on Alpine Linux / Docker is not supported by this command.                                                                       
✖ To update Node.js you should pull down the latest version of the oznu/homebridge Docker image.

Have already pulled down the latest version a week or so ago when I first tried to upgrade the config-ui plugin and ran into the same problem.

Docker Config

n/a

Logs

No response

Host Operating System

Synology DSM 7

Host Architecture

x86_64 / amd64

oznu commented 1 year ago

You are not running the latest image. After pulling a new image, you need to delete and recreate the container.

the latest image is up to date.

acahir commented 1 year ago

Mostly an FYI. Blew away the container, removed and reinstalled the Homebridge Synology package. Recreated the container and that seems to have cleared away whatever was stuck. Version of config-UI is up to date to start, vs being very old.

Strangely, on the docker image command line, node isn't anywhere to be found now? Is it no longer required?

acahir commented 1 year ago

You are not running the latest image. After pulling a new image, you need to delete and recreate the container.

the latest image is up to date.

I had "Reset" the container in the Docker Synology app, which I believe is the new term used in DSM7