jfarmer08 / homebridge-wyze-smart-home

Wyze Smart Home plugin for Homebridge.
MIT License
103 stars 17 forks source link

Dev branch dependencies not loading correctly in Homebridge #70

Closed carTloyal123 closed 1 year ago

carTloyal123 commented 1 year ago

Describe The Bug:

When installing the dev branch in Homebridge the dependencies try to load "@typescript-eslint/parserr" which is not installed by default since it is supposed to be for dev only. To Reproduce:

Install dev release of homebridge-wyze-smart-home and launch Homebridge.

Expected behavior:

Expected to install all dependencies correctly whether dev or production.

Logs:

[05/01/2023, 09:06:52] Error: Cannot find module '@typescript-eslint/parser'
Require stack:
- /var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeThermostat.js
- /var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/WyzeSmartHome.js
- /var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/index.js
- /var/lib/homebridge/node_modules/homebridge/lib/plugin.js
- /var/lib/homebridge/node_modules/homebridge/lib/pluginManager.js
- /var/lib/homebridge/node_modules/homebridge/lib/server.js
- /var/lib/homebridge/node_modules/homebridge/lib/cli.js
- /var/lib/homebridge/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/var/lib/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeThermostat.js:1:25)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
[05/01/2023, 09:06:52] ====================

Plugin Config:

 {
            "name": "Wyze",
            "refreshInterval": 60000,
            "entryExitDelay": 30,
            "showAdvancedOptions": true,
            "excludeMacAddress": false,
            "excludedeviceType": true,
            "filterDeviceTypeList": [
                "OutdoorPlug",
                "Plug",
                "Light",
                "MeshLight",
                "LightStrip",
                "ContactSensor",
                "MotionSensor",
                "Lock",
                "TemperatureHumidity",
                "LeakSensor",
                "Camera",
                "Common",
                "S1Gateway"
            ],
            "platform": "WyzeSmartHome"
}

Environment:

jfarmer08 commented 1 year ago

That is odd since the dependency has not change since release

jfarmer08 commented 1 year ago

Ok so I see. You need to pull this out const { clearCaches } = require('@typescript-eslint/parser')

Or add it to dependencies since it's only in devdependencies

carTloyal123 commented 1 year ago

Fixed up stream, had auto imports get the wrong package :/