Homey Community Forum

Can't debug app


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 (…
✓ 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


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

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:

npm --version
node --version
homey --version

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

c:>node --version

c:>homey --version

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


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.

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.

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 :slight_smile:

Thanks for your time!

Have a nice day.