Closed RuntyCascade closed 2 years ago
This is an issue with npm
, not with Homebridge Hue. I think I’ve seen this once, after a bad system crash. Deleting the directory manually solved it, I think. Maybe also clearing the npm
cache, also it bitches that that shouldn’t be needed ever.
This is an issue with
npm
, not with Homebridge Hue. I think I’ve seen this once, after a bad system crash. Deleting the directory manually solved it, I think. Maybe also clearing thenpm
cache, also it bitches that that shouldn’t be needed ever.
Thank you for the response! How do I go about deleting the directory or clearing cache? I have no idea what to do
I've restored from a backup before the issue occurred, but Hue plugin is the only one that still couldn't be reinstalled. something about a lockfile. I cant really decipher what this is telling me what I've tried to do:
pi@homebridge:~ $ sudo npm cache clean
npm ERR! As of npm@5, the npm cache self-heals from corruption issues
npm ERR! by treating integrity mismatches as cache misses. As a result,
npm ERR! data extracted from the cache is guaranteed to be valid. If you
npm ERR! want to make sure everything is consistent, use npm cache verify
npm ERR! instead. Deleting the cache can only make npm go slower, and is
npm ERR! not likely to correct any problems you may be encountering!
npm ERR!
npm ERR! On the other hand, if you're debugging an issue with the installer,
npm ERR! or race conditions that depend on the timing of writing to an empty
npm ERR! cache, you can use npm install --cache /tmp/empty-cache
to use a
npm ERR! temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command
npm ERR! with --force.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-01-06T22_02_02_883Z-debug.log
pi@homebridge:~ $ sudo hb-config Updating Node.js to LTS, please wait... Installed: v16.13.1 Current Node.js LTS: v16.13.1 Updating Homebridge, please wait... npm WARN deprecated class-transformer@0.3.2: This release contains a breaking change from 0.3.1 but otherwise functions properly. Please read the changelog on Github to learn more.
changed 438 packages, and audited 439 packages in 3m
69 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities Restarting Homebridge...
pi@homebridge:~ $ sudo npm audit fix npm ERR! code ENOLOCK npm ERR! audit This command requires an existing lockfile. npm ERR! audit Try creating one first with: npm i --package-lock-only npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-01-06T22_21_58_728Z-debug-0.log pi@homebridge:~ $ npm fund pi
pi@homebridge:~ $ npm audit npm ERR! code ENOLOCK npm ERR! audit This command requires an existing lockfile. npm ERR! audit Try creating one first with: npm i --package-lock-only npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-01-06T22_22_41_998Z-debug-0.log
fixed. figured out how to move/rename folder:
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/homebridge-hue' -> '/usr/local/lib/node_modules/.homebridge-hue-34H5WCcU'
after doing that, i was able to reinstall. no issues at the moment
@RuntyCascade
Got the same issue today when updating homebridge-hue.
Could you please tell how you moved/renamed the folder? (i'm not very good at this, so as basic as possible)
Here's how to move the folder, for other dummies like me :) :
sudo mv /usr/local/lib/node_modules/homebridge-hue /usr/local/lib/node_modules/.homebridge-hue-34H5WCcU
After that, it's just a matter of installing plugin again, and moving all accessories back to their correct rooms.
Thank you, it helped :-)
Issue
hue was uninstalled on its own, not shown in plugins area anymore. It happened when the most recent update was available, it seems like it crashed midway and just completely removed it from the plugin list. The config is still there though. cannot install anymore. just fails. how can i fix this?
USER: pi DIR: /usr/local CMD: sudo -E -n npm install -g homebridge-hue@latest
npm ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path /usr/local/lib/node_modules/homebridge-hue npm ERR! dest /usr/local/lib/node_modules/.homebridge-hue-34H5WCcU npm ERR! errno -39 npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/homebridge-hue' -> '/usr/local/lib/node_modules/.homebridge-hue-34H5WCcU'
npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-01-06T04_07_19_532Z-debug.log
Command failed. Please review log for details.
Log Messages
[05/01/2022, 19:37:09] [Homebridge UI] Running Command: sudo -E -n npm install -g homebridge-hue@latest [05/01/2022, 19:38:23] [Homebridge UI] Command failed. Please review log for details.
Debug Files