# Can't debug app

**URL:** <https://community.homey.app/t/cant-debug-app/40847>\
**Category:** Developers\
**Created:** [January 10, 2021, 6:03pm UTC](https://community.homey.app/t/cant-debug-app/40847 "2021-01-10T18:03:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dactilus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dactilus/32/29792_2.png) [@Dactilus](https://community.homey.app/u/Dactilus)\
**Post date:** [January 10, 2021, 6:03pm UTC](https://community.homey.app/t/cant-debug-app/40847/1 "2021-01-10T18:03:16Z")

</div>

Hi,

i am trying to deploy my app to homey from cmd line i am getting error. It was working like 2 months ago and now i can’t deploy properly even blank app created by wizard.

When i run app created by wizard and with no modifications, i get error. See log below:

c:\Users\Myš\Documents\HomeyApps\com.mys.testapp\>homey app run  
✓ Pre-processing app…  
✓ Validating app…  
✓ Homey App validated successfully against level `debug`  
✓ Packing Homey App…  
✓ Pruning dev dependencies…  
× Error occurred during npm prune TypeError: prunePathsJson.removed.map is not a function  
at Function.getPrunePaths (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\lib\Modules\NpmCommands.js:106:49)  
at processTicksAndRejections (node:internal/process/task\_queues:93:5)  
at async C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\lib\App\index.js:696:26  
— App size: 25.21 MB  
✓ Installing Homey App on `Michal's Homey Pro` ([http://192.168.0.12:80](http://192.168.0.12:80))…  
✓ Homey App `com.mys.testapp` successfully installed  
✓ Running `com.mys.testapp`, press CTRL+C to quit  
— Profile your app’s performance at XXX  
─────────────── Logging stdout & stderr ───────────────  
HERE I GET DUMP OF ENTIRE FILE …\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js

and then:  
TypeError: Cannot read property ‘merge’ of undefined  
at n.concatBuffers (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:433913)  
at C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:435180  
at n.applyExtensions (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:434365)  
at C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:435023  
at n.flush (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:434136)  
at n.finish (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:435372)  
at n.expectHandler (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:434880)  
at n.add (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:430335)  
at Socket.c (C:\Users\Myš\AppData\Roaming\npm\node\_modules\homey\node\_modules\athom-api\dist\index.js:1:449063)  
at Socket.emit (node:events:376:20)  
at addChunk (node:internal/streams/readable:311:12)  
at readableAddChunk (node:internal/streams/readable:286:9)  
at Socket.Readable.push (node:internal/streams/readable:225:10)  
at TCP.onStreamRead (node:internal/stream\_base\_commons:192:23)

and it exit back to commandline.

Does someone have an idea, what is wrong?

Homey firmware: 5.0.0-rc.50

Thanks,  
Michal

---

<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:** [January 10, 2021, 7:09pm UTC](https://community.homey.app/t/cant-debug-app/40847/2 "2021-01-10T19:09:38Z")

</div>

There’s a lot going wrong there. For one, it looks like this command is failing:

```auto
npm prune --production --dry-run --json

```

Can you run that from your app directory to see what its output is?

Also, what is the output of these commands:

```auto
npm --version
node --version
homey --version

```

---

<div class="post-metadata">

**Author:** ![Dactilus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dactilus/32/29792_2.png) [@Dactilus](https://community.homey.app/u/Dactilus)\
**Post date:** [January 11, 2021, 8:35pm UTC](https://community.homey.app/t/cant-debug-app/40847/3 "2021-01-11T20:35:29Z")

</div>

This is from console:  
c:\>npm --version  
6.14.10

c:\>node --version  
v12.20.1

c:\>homey --version  
2.9.4

c:\Users\Myš\Documents\HomeyApps\com.mys.testapp\>node app.js

c:\Users\Myš\Documents\HomeyApps\com.mys.testapp\>

I tryied run that app on my work laptop and it works properly, so i guess my environment on pc is broken or wrong set.

---

<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:** [January 12, 2021, 5:41am UTC](https://community.homey.app/t/cant-debug-app/40847/4 "2021-01-12T05:41:38Z")

</div>

> [@Dactilus](#):
>
> so i guess my environment on pc is broken or wrong set.

Yes it sounds like it, although I don’t know where to start looking (I don’t use Windows). Perhaps start by reinstalling Node, npm and `homey`.

---

<div class="post-metadata">

**Author:** ![Dactilus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dactilus/32/29792_2.png) [@Dactilus](https://community.homey.app/u/Dactilus)\
**Post date:** [January 13, 2021, 8:12am UTC](https://community.homey.app/t/cant-debug-app/40847/5 "2021-01-13T08:12:35Z")

</div>

I tryied to uninstall everything about nodejs and all frameworks, then install it back, but it did not help, so i ended up reinstalling whole system. I would do it either way, because my windows instance was like 5 years old.

I am new to nodejs world so i was trying different versions of frameworks, several tools and libraries so i probably broke the environment somewhere on the way.

In any case, its working now finally 🙂

Thanks for your time!

Have a nice day.
