# \[Homey2019Pro\] homey-zwavedriver not found?

**URL:** <https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732>\
**Category:** Developers\
**Tags:** z-wave, homey-pro\
**Created:** [June 20, 2023, 5:35pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732 "2023-06-20T17:35:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Kouters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tim_kouters/32/79339_2.png) [@Tim\_Kouters](https://community.homey.app/u/Tim_Kouters)\
**Post date:** [June 20, 2023, 5:35pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/1 "2023-06-20T17:35:44Z")

</div>

Hi,

I’m updating my domitech app to the newest SDK3 and the homey-zwavedriver.  
(Source code: [GitHub - timkouters/nl.timkouters.domitech: This app adds support for Domitech devices in Homey.](https://github.com/timkouters/nl.timkouters.domitech))

When I run this app on my HomeyPro early 2019 version I constantly get the error that the homey-zwavedriver cannot be found (see below).  
Now the fun part, other user the do the checkout of the same code they can run the domitech app without any issues. These users are using the HomeyPro 2023 version.

Is there anything different between the 2019 and 2023 Pro version of Homey and should I therefor stick to the deprecated meshdriver?

Details of the crash:

```auto
timkouters@dev-TimKouters:~/github2/nl.timkouters.domitech$ homey app run
✓ Pre-processing app...
✓ Validating app...
✓ App validated successfully against level `debug`
✓ Packing Homey App...
 — App archive size: 153.5 KB, 15 files
✓ Installing Homey App on `Homey Pro van Tim` (http://10.0.0.232:80)...
✓ Homey App `nl.timkouters.domitech` successfully installed
✓ Running `nl.timkouters.domitech`, press CTRL+C to quit
 — Profile your app's performance at https://go.athom.com/app-profiling?homey=61276845aae08b0bb23bc2f3&app=nl.timkouters.domitech
─────────────── Logging stdout & stderr ───────────────
[log] 2023-06-20 17:00:11 [DomitechApp] Starting Domitech Z-Wave app
[err] 2023-06-20 17:00:11 [ManagerDrivers] [Driver:dtA19-750-27] Error Initializing Device: Error: Cannot find module 'homey-zwavedriver'
Require stack:
- /drivers/dtA19-750-27/device.js
- /opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/lib/Util.js
- /opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/lib/Device.js
- /opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/homey.js
- /opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/index.js
- /opt/homey-client/system/manager/ManagerApps/AppProcess/bootstrap.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at Module.require (/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/index.js:1:183)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/drivers/dtA19-750-27/device.js:3:25)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/drivers/dtA19-750-27/device.js',
    '/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/lib/Util.js',
    '/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/lib/Device.js',
    '/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/homey.js',
    '/opt/homey-client/system/manager/ManagerApps/AppProcess/node_modules/homey-apps-sdk-v3/index.js',
    '/opt/homey-client/system/manager/ManagerApps/AppProcess/bootstrap.js'
  ]
}

```

Who can help me out?

Kind regards,  
Tim

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 20, 2023, 7:56pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/2 "2023-06-20T19:56:30Z")

</div>

```auto
✓ Packing Homey App...
 — App archive size: 153.5 KB, 15 files

```

The `node_modules` directory in your repo has many more files, so it’s not being uploaded to your Homey, likely because it’s mentioned in `.homeyignore` or `.gitignore`.

---

<div class="post-metadata">

**Author:** ![Tim\_Kouters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tim_kouters/32/79339_2.png) [@Tim\_Kouters](https://community.homey.app/u/Tim_Kouters)\
**Post date:** [June 20, 2023, 8:26pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/3 "2023-06-20T20:26:06Z")

</div>

Hi Robert,

Thanks for the quick reply.  
I’ve searched for the two files but they are not present on my local storage.

```auto
timkouters@dev-TimKouters:~/github2/nl.timkouters.domitech$ find . -name .gitignore
timkouters@dev-TimKouters:~/github2/nl.timkouters.domitech$ find . -name .homeyignore

```

I did read that for the new Homey CLI they excluded the node\_modules.  
See [Developer's update: Homey SDK tools | Homey](https://homey.app/en-ie/blog/developers-update-homey-sdk-tools/)

Kind regards,  
Tim

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 21, 2023, 4:02am UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/4 "2023-06-21T04:02:53Z")

</div>

> [@Tim\_Kouters](#):
>
> I did read that for the new Homey CLI they excluded the node\_modules.

That’s not what that page says 🙂 Also, it’s a 3-year-old blog post.

But it does look like a local issue, the app installs just fine both on my HP2019 and HP2023:

```auto
✓ Packing Homey App...
 — App archive size: 838.5 KB, 242 files
✓ Installing Homey App on `Homey` (http://192.168.23.8:80)...
✓ Homey App `nl.timkouters.domitech` successfully installed
✓ Running `nl.timkouters.domitech`, press CTRL+C to quit
 — Profile your app's performance at https://go.athom.com/app-profiling?homey=XXX&app=nl.timkouters.domitech
─────────────── Logging stdout & stderr ───────────────
[log] 2023-06-21 03:55:00 [DomitechApp] Starting Domitech Z-Wave app

```

Does `.homeybuild/node_modules` contain the `homey-zwavedriver` module?

Do you have a `.npmignore` file?

---

<div class="post-metadata">

**Author:** ![Tim\_Kouters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tim_kouters/32/79339_2.png) [@Tim\_Kouters](https://community.homey.app/u/Tim_Kouters)\
**Post date:** [June 23, 2023, 8:13pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/5 "2023-06-23T20:13:48Z")

</div>

Hi,

I also think it’s a local issue.

I do have .npmignore files but not in the homey-zwavedriver.  
Furthermore, the .homeybuild does not contain any node\_modules directory.

```auto
timkouters@dev-TimKouters:~/github2/nl.timkouters.domitech$ find . -name .npmignore
./node_modules/mumath/.npmignore
./node_modules/almost-equal/.npmignore
./node_modules/stack-trace/.npmignore
./node_modules/uuid/.npmignore
timkouters@dev-TimKouters:~/github2/nl.timkouters.domitech$ cd .homeybuild/
timkouters@dev-TimKouters:~/github2/nl.timkouters.domitech/.homeybuild$ ls
app.js assets LICENSE package.json README.md
app.json drivers locales package-lock.json README.txt

```

---

<div class="post-metadata">

**Author:** ![Tim\_Kouters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tim_kouters/32/79339_2.png) [@Tim\_Kouters](https://community.homey.app/u/Tim_Kouters)\
**Post date:** [June 23, 2023, 8:31pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/6 "2023-06-23T20:31:51Z")

</div>

Update from my side.  
If I manually copy the node\_module folder to the .homeybuild directory and run the app with skipping the build all is working.

```auto
homey app run -s

```

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 24, 2023, 5:28am UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/7 "2023-06-24T05:28:13Z")

</div>

The best way to debug this is to edit the file `App.js` in `$PREFIX/lib/node_modules/homey/lib` (where `$PREFIX` is the output of the command `npm prefix`, typically it’s `/usr/local`).

My guess is that the issue is happening somewhere in the `_copyAppProductionDependencies` method, so you should probably add a bunch of debug `console.log()` entries to see which steps it takes (and which it doesn’t).

Also, just in case: which version of `homey` do you have installed (`homey --version`)? The latest stable is `2.34.0`.

---

<div class="post-metadata">

**Author:** ![Tim\_Kouters](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tim_kouters/32/79339_2.png) [@Tim\_Kouters](https://community.homey.app/u/Tim_Kouters)\
**Post date:** [June 25, 2023, 12:11pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/8 "2023-06-25T12:11:35Z")

</div>

Hi Robert,

I’m indeed running version 2.34.0 of Homey.  
The issue is in the `npm list .` command.

```auto
timkouters@dev-TimKouters:~/github/nl.timkouters.domitech$ npm list .
nl.timkouters.domitech@2.0.0 /home/timkouters/github/nl.timkouters.domitech
└── (empty)

timkouters@dev-TimKouters:~/github/nl.timkouters.domitech$ npm list -g
/usr/local/lib
├── homey@2.34.0
└── npm@9.6.2

```

I’ve created a VM at my other PC with a new linux distro install.  
There I get proper output of ‘npm list .’

I’m going to re-install my laptop.

Thanks for helping me out.

Kind regards,  
Tim

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 25, 2023, 12:18pm UTC](https://community.homey.app/t/homey2019pro-homey-zwavedriver-not-found/82732/9 "2023-06-25T12:18:58Z")

</div>

> [@Tim\_Kouters](#):
>
> The issue is in the `npm list .` command.

I don’t see `homey` running that command, it runs:

```auto
npm ls --parseable --all --only=prod

```

(passing `.` is incorrect as argument as it requires a package spec, not a directory name)
