Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Update of homebridge and homebridge-config-ui-x, pino-pretty is not found #811

Closed
yjeanrenaud opened this issue Aug 13, 2020 · 2 comments
Labels

Comments

@yjeanrenaud
Copy link

Describe Your Problem:
I use homebridge on raspian and I updated it via the web ui. now the hb service is running but the web ui failes due to a package missing. But I installed if via npm install pino-pretty, with and without sudo and even with runuser -l homebridge. No luck.

Logs:
[8/13/2020, 17:31:15] [homebridge-config-ui-x] Error: Missing pino-pretty module: pino-pretty must be installed separately
[8/13/2020, 17:31:15] [homebridge-config-ui-x] Caught Unhandled Rejection Error :: Details Below
Error: Missing pino-pretty module: pino-pretty must be installed separately
at getPrettyStream (/usr/lib/node_modules/homebridge-config-ui-x/node_modules/pino/lib/tools.js:165:11)
at normalizeArgs (/usr/lib/node_modules/homebridge-config-ui-x/node_modules/pino/lib/tools.js:310:16)
at pino (/usr/lib/node_modules/homebridge-config-ui-x/node_modules/pino/pino.js:65:28)
at createPinoLogger (/usr/lib/node_modules/homebridge-config-ui-x/node_modules/fastify/lib/logger.js:47:14)
at createLogger (/usr/lib/node_modules/homebridge-config-ui-x/node_modules/fastify/lib/logger.js:92:20)
at build (/usr/lib/node_modules/homebridge-config-ui-x/node_modules/fastify/fastify.js:96:33)
at /usr/lib/node_modules/homebridge-config-ui-x/dist/main.js:37631:24
at Generator.next ()
at fulfilled (/usr/lib/node_modules/homebridge-config-ui-x/dist/main.js:37605:58)
[8/13/2020, 17:31:15] [Deckenlampe] Initializing ShellSwitch accessory...
[8/13/2020, 17:31:15] [Light B] Initializing ShellSwitch accessory...
Setup Payload:
Homebridge Config:

{
    "bridge": {
        "name": "Homebridge NO",
        "username": "NO",
        "port": 51255,
        "pin": "NO"
    },
    "accessories": [
        {
            "accessory": "ShellSwitch",
            "name": "Nintendo Wii",
            "onCmd": "/home/homebridge/control/a_on.sh",
            "offCmd": "/home/homebridge/control/a_off.sh"
        },
        {
            "accessory": "ShellSwitch",
            "name": "B",
            "onCmd": "/home/homebridge/control/b_on.sh",
            "offCmd": "/home/homebridge/control/b_off.sh"
        },
        {
            "accessory": "ShellSwitch",
            "name": "ROUTER",
            "onCmd": "/home/homebridge/control/c_on.sh",
            "offCmd": "/home/homebridge/control/c_off.sh"
        },
        {
            "accessory": "ShellSwitch",
            "name": "D (silent)",
            "onCmd": "/home/homebridge/control/d_on.sh",
            "offCmd": "/home/homebridge/control/d_off.sh"
        },
        {
            "accessory": "ShellSwitch",
            "name": "Kristall",
            "onCmd": "/home/homebridge/control/e_on.sh",
            "offCmd": "/home/homebridge/control/e_off.sh"
        },
        {
            "accessory": "ShellSwitch",
            "name": "Deckenlampe",
            "onCmd": "/home/homebridge/control/lighta_on.sh",
            "offCmd": "/home/homebridge/control/lighta_off.sh"
        },
        {
            "accessory": "ShellSwitch",
            "name": "Light B",
            "onCmd": "/home/homebridge/control/lightb_on.sh",
            "offCmd": "/home/homebridge/control/lightb_off.sh"
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "c",
            "lang": "auto",
            "debug": true,
            "platform": "config",
            "sudo": true,
            "log": {
                "method": "native",
                "path": "/var/lib/homebridge/homebridge.log"
            },
            "sessionTimeout": 28800
        }
    ]
}

Environment:

  • Node.js Version: v12.18.3
  • NPM Version: 6.14.7
  • Homebridge Version: 1.1.2
  • Homebridge Config UI X Version: v4.25.1
  • Operating System: Raspbian
  • Process Supervisor: hb-service
@seydx
Copy link

seydx commented Aug 13, 2020

Same here

Fix:

cd /usr/lib/node_modules/homebridge-config-ui-x/node_modules/

sudo npm i pino-pretty@latest

restart

@oznu oznu closed this as completed in c9db5ab Aug 13, 2020
@oznu
Copy link
Member

oznu commented Aug 13, 2020

This only impacted users with the the UI's "debug" option enabled which is why I didn't notice it in my normal pre-release testing sorry.

If you are experiencing this issue please install the latest release manually via SSH:

sudo npm install -g --unsafe-perm homebridge-config-ui-x@latest

Then restart:

sudo hb-service restart

oznu added a commit that referenced this issue Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants