fjhorrillo / homebridge-airzone-cloud

Homebridge Airzone Cloud
Apache License 2.0
22 stars 3 forks source link

Error: Cannot find module '/usr/lib/node_modules/homebridge-airzone-cloud/dist/index.js' #1

Closed matnoublanche closed 3 years ago

matnoublanche commented 3 years ago

Describe The Bug:

I have Error: Cannot find module '/usr/lib/node_modules/homebridge-airzone-cloud/dist/index.js' when I start Homebridge

I tried to mv from src folder to dist folder when I see that dist folder isn't exists but the problem still persists.

To Reproduce:

git clone https://github.com/fjhorrillo/homebridge-airzone-cloud.git npm install -g homebridge-airzone-cloud

Restart Homebridge

Logs:

[2/6/2021, 7:27:18 PM] ====================
[2/6/2021, 7:27:18 PM] ERROR LOADING PLUGIN homebridge-airzone-cloud:
[2/6/2021, 7:27:18 PM] Error: Cannot find module '/usr/lib/node_modules/homebridge-airzone-cloud/dist/index.js'
Require stack:
- /var/www/html/plugins/homebridge/resources/node_modules/homebridge/lib/plugin.js
- /var/www/html/plugins/homebridge/resources/node_modules/homebridge/lib/pluginManager.js
- /var/www/html/plugins/homebridge/resources/node_modules/homebridge/lib/api.js
- /var/www/html/plugins/homebridge/resources/node_modules/homebridge/lib/server.js
- /var/www/html/plugins/homebridge/resources/node_modules/homebridge/lib/cli.js
- /var/www/html/plugins/homebridge/resources/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Plugin.load (/var/www/html/plugins/homebridge/resources/node_modules/homebridge/src/plugin.ts:181:27)
    at /var/www/html/plugins/homebridge/resources/node_modules/homebridge/src/pluginManager.ts:120:16
    at Map.forEach (<anonymous>)
    at PluginManager.initializeInstalledPlugins (/var/www/html/plugins/homebridge/resources/node_modules/homebridge/src/pluginManager.ts:118:18)
    at Server.start (/var/www/html/plugins/homebridge/resources/node_modules/homebridge/src/server.ts:150:24)
    at cli (/var/www/html/plugins/homebridge/resources/node_modules/homebridge/src/cli.ts:80:10)
[2/6/2021, 7:27:18 PM] ====================

Environment:

fjhorrillo commented 3 years ago

Hello, this is because I had not published it in npm. If you want to install it manually, try this:

npm install
npm run build

I have just published this so now you can install it from homebridge UI or manually by:

npm -g i homebridge-airzone-cloud