First time running this plugin, it wasn't working. Homebridge logs showed:
Error: Cannot find module 'tough-cookie' // Full error below
Running the npm install command manually revealed that axios has a peer dependency on tough-cookie:
npm WARN axios-cookiejar-support@1.0.1 requires a peer of @types/tough-cookie@>=2.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN axios-cookiejar-support@1.0.1 requires a peer of tough-cookie@>=2.3.3 but none is installed. You must install peer dependencies yourself.
Apparently some older versions of NPM do not install peer dependencies. I'm running Ubuntu 20.04.2 LTS (GNU/Linux 5.11.0-38-generic x86_64) which has older npm version 6.14.15 at the moment , but might be somewhat common. I don't know how to work around this to make it automatic as part of the plugin install, and it may not be worth trying given that having a newer NPM should fix it. I thought I'd file an issue in case it saves someone else some time. Personally, I ran 'sudo npm install tough-cookie@latest' to fix.
/usr/lib/node_modules/homebridge/bin/homebridge
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object. (/home/randy/github/sengled/homebridge-sengled-bulbs/node_modules/axios-cookiejar-support/lib/interceptors/request.js:8:43)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
First time running this plugin, it wasn't working. Homebridge logs showed:
Error: Cannot find module 'tough-cookie' // Full error below
Running the npm install command manually revealed that axios has a peer dependency on tough-cookie:
npm WARN axios-cookiejar-support@1.0.1 requires a peer of @types/tough-cookie@>=2.3.3 but none is installed. You must install peer dependencies yourself. npm WARN axios-cookiejar-support@1.0.1 requires a peer of tough-cookie@>=2.3.3 but none is installed. You must install peer dependencies yourself.
Apparently some older versions of NPM do not install peer dependencies. I'm running Ubuntu 20.04.2 LTS (GNU/Linux 5.11.0-38-generic x86_64) which has older npm version 6.14.15 at the moment , but might be somewhat common. I don't know how to work around this to make it automatic as part of the plugin install, and it may not be worth trying given that having a newer NPM should fix it. I thought I'd file an issue in case it saves someone else some time. Personally, I ran 'sudo npm install tough-cookie@latest' to fix.
[11/13/2021, 5:03:52 PM] ERROR LOADING PLUGIN homebridge-sengled-bulbs: [11/13/2021, 5:03:52 PM] Error: Cannot find module 'tough-cookie' Require stack: