Cannot update to 4.46.0 - Error at NPM Cache Cleanup
See original GitHub issueDescribe The Bug

Logs
**Primary Log File Entry:**
[07/06/2022, 09:02:00] [Homebridge UI] Running Command: sudo -E -n npm install -g homebridge-config-ui-x@latest
[07/06/2022, 09:02:28] [Homebridge UI] npm cache clear command executed with exit code 0
[07/06/2022, 09:02:28] [Homebridge UI] Command failed. Please review log for details.
[07/06/2022, 09:58:03] [Homebridge UI] Running Command: sudo -E -n npm install -g homebridge-config-ui-x@latest
[07/06/2022, 09:58:38] [Homebridge UI] npm cache clear command executed with exit code 0
[07/06/2022, 09:58:38] [Homebridge UI] Command failed. Please review log for details.
**Detailed Log File Entry:**
1446 timing reify:rollback:retireShallow Completed in 5ms
1447 timing command:install Completed in 23697ms
1448 verbose stack Error: ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/homebridge-config-ui-x' -> '/usr/local/lib/node_modules/.homebridge-config-ui-x-3gtnOIj4'
1449 verbose cwd /usr/local
1450 verbose Linux 5.10.103-v7+
1451 verbose node v16.15.1
1452 verbose npm v8.11.0
1453 error code ENOTEMPTY
1454 error syscall rename
1455 error path /usr/local/lib/node_modules/homebridge-config-ui-x
1456 error dest /usr/local/lib/node_modules/.homebridge-config-ui-x-3gtnOIj4
1457 error errno -39
1458 error ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/homebridge-config-ui-x' -> '/usr/local/lib/node_modules/.homebridge-config-ui-x-3gtnOIj4'
1459 verbose exit -39
1460 timing npm Completed in 24163ms
1461 verbose unfinished npm timer reify 1654722502772
1462 verbose unfinished npm timer reify:retireShallow 1654722526420
1463 verbose code -39
1464 error A complete log of this run can be found in:
1464 error /home/pi/.npm/_logs/2022-06-08T21_08_22_316Z-debug-0.log
Config
No response
Homebridge UI Version
4.44.1
Homebridge Version
1.4.1
Node.js Version
16.15.0
Operating System
Official Homebridge Raspberry Pi Image
Environment Info
- Using Docker?
- Using Hyper-V?
- Using hb-service?
Raspberry Pi Model
Raspberry Pi 3 B+
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Cannot update to Homebridge UI to 4.46.0 - Error at NPM ...
I'm attempting to upgrade homebridge-config-ui-x v4.44.1 to version 4.46.0. However the upgrade fails with the following errors.
Read more >npm ERR while resolving cache-loader@4.1.0 #7095 - GitHub
Conflicting peer dependency: webpack@4.46.0 npm ERR! ... Same error for me. cache-loader is deprecated and should be replaced by built-in ...
Read more >Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >can't install dependencies because of node and webpack ...
Try to delete package-lock.json and clear npm cache using 'npm cache clean -f' before npm i. Caret (^) notation: It will update you...
Read more >To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a higher level tool to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well…that seems to have resolved the issue - the reinstall and recovery of the system. I’m now at 4.46.0 and everything seems to be working as expected.
@atlienk For the future, add the user you use for Homebridge, for example Pi for sudo group with Root privileges.