notabene00 / HomeyCONZ

deCONZ app for Athom Homey smart home controller
GNU General Public License v3.0
18 stars 11 forks source link

Error: Cannot find module '../../node_modules/nbhttp' #40

Closed jghaanstra closed 4 years ago

jghaanstra commented 4 years ago

Describe the bug: I was running an older version of HomeyCONZ and decided to upgrade. Did a git pull and a homey app install. But the app crashed with the following stacktrace.

module.js:550
    throw err;
    ^

Error: Cannot find module '../../node_modules/nbhttp'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at Module.require (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/index.js:1:253)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/drivers/Driver.js:4:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)

--- INFO: ru.notabene.deconz has been killed ---

I tried installing an older version of HomeyCONZ but got the same issue. Might be related to the new homey CLI.

How to reproduce:

  1. Update homey CLI to latest npm install -g homey
  2. Pull latest updates from HomeyCONZ
  3. Run homey app run

How it should work: Install without error.

jghaanstra commented 4 years ago

Yes, confirmed that it's a new version of the homey cli. Downgraded to version 2.0.6 (from 3 months ago) and HomeyCONZ installs and runs without error.

One of the latest versions strips dev dependencies. Looks like it's stipping to much for HomeyCONZ where it also remove nbhttp.

jonwal8 commented 4 years ago

Tried to downgraded to 2.0.6 of homey cli, but I get the same error message as @jghaanstra

notabene00 commented 4 years ago

athom-cli@3.0.2, can't reproduce described behavior @jghaanstra can you test if it is still the case?

jghaanstra commented 4 years ago

Hello @fantomnotabene, athom-cli is deprecated and replaced by homey npm package ( npm install -g homey). Latest version is 2.1.5 and running homey app run still results in the same error.