notabene00/HomeyCONZ

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

Closed this issue · 4 comments

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.

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.

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

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

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.