Error occurred during npm prune TypeError

Hello everyone,

I followed the “Getting Started” to try to create my first project,
and when I run “homey app run” to get some error see long below:

user@EVUb-11218:~/work/com.company.myapp$ sudo homey app run
✓ Pre-processing app...
✓ Running plugins...
✓ Running plugin `compose`...
✓ Plugin `compose` finished
✓ 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 (/usr/local/lib/node_modules/homey/lib/Modules/NpmCommands.js:106:49)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async /usr/local/lib/node_modules/homey/lib/App/index.js:696:26
 — App size: 25.23 MB
✓ Installing Homey App on `YI's Homey` (http://192.168.81.245:80)...
✖ An unkown error has occured [incompatible_app_version]

My environment blow:
Ubuntu: 18.04.5 LTS
node js: v15.9.0
npm: 7.5.4
homey: 2.9.7

app.json:
1.compatibility: >=5.0.0
2.sdk: 3

homey system (device):
1.release: 4.14.15-g3c513a6eca
2. nodeVersion: v12.16.1
3.homeyVersion: 4.2.0

Also, my homey system can’t use SDK v3 (my version 4.2.0), have someway can update my homey device version?

Please tell me how to fix them, thanks so much.

prunePathsJson.removed.map is a known issue with the homey command.

The new v5 firmware is being rolled out, so you have to wait for a bit before it becomes available for you.

2 Likes