Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Rename directory not possible on update #1035

Open
kylewhirl opened this issue Aug 29, 2024 · 4 comments
Open

Bug: Rename directory not possible on update #1035

kylewhirl opened this issue Aug 29, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@kylewhirl
Copy link

Describe the Bug

I get an error when trying to install a new version of the plugin. It gets to rename a directory but can’t since the directory is full. I know how to fix it, but this is not the first time this has happened

To Reproduce

Install v3.1.3 of SwitchBot plugin
Install v3.7.0 of SwitchBot plugin

Expected Behavior

The directory should not be renamed, especially not hidden either

Relevant Log Output

npm
 ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR!
 path /usr/local/lib/node_modules/@switchbot/homebridge-switchbot
npm ERR! dest /usr/local/lib/node_modules/@switchbot/.homebridge-switchbot-UUyzm0HE
npm ERR! errno -39
npm
ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/@switchbot/homebridge-switchbot' -> '/usr/local/lib/node_modules/@switchbot/.homebridge-switchbot-UUyzm0HE'
npm ERR!
 A complete log of this run can be found in: /home/pi/.npm/_logs/2024-08-29T18_13_11_428Z-debug-0.log


Operation failed with code 217.

You can download this log file for future reference.

See https://github.com/homebridge/homebridge-config-ui-x/wiki/Troubleshooting for help.

Config for homebridge-switchbot

This is not needed

Screenshots

No response

Device and Model

Not needed

Node.js Version

v20.11.1

NPM Version

vI.D.K

Homebridge Version

v1.8.4

Homebridge Switchbot Plugin Version

v3.7.0

Homebridge Config UI X Plugin Version

v4.41.2

Operating System

Raspbian

@donavanbecker
Copy link
Collaborator

this is a permissions issue.

@kylewhirl
Copy link
Author

How do I fix it without having to copy the code the plugin is trying to execute with sudo?

@donavanbecker
Copy link
Collaborator

donavanbecker commented Sep 11, 2024

Try:

sudo nom install -g --unsafe-perm @switchbot/homebridge-switchbot

@donavanbecker donavanbecker reopened this Sep 11, 2024
@kylewhirl
Copy link
Author

kylewhirl commented Sep 22, 2024

Try:

sudo npm install -g --unsafe-perm @switchbot/homebridge-switchbot

Still same issue with the same error, directory is not empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants