mlaurijsse / homebridge-rflink-gateway

Homebridge plugin to interface with RFLink
10 stars 4 forks source link

Error: could not create leading directories #12

Open hunhejj opened 3 years ago

hunhejj commented 3 years ago

I got the following error when running sudo npm install -g https://github.com/mlaurijsse/homebridge-rflink-gateway:

npm ERR! code 128 npm ERR! Command failed: git clone --mirror -q https://github.com/mlaurijsse/homebridge-rflink-gateway.git /root/.npm/_cacache/tmp/git-clone-26f29f2a/.git npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-26f29f2a/.git'

Any ideas @mlaurijsse ?

mlaurijsse commented 2 years ago

Hi @hunhejj,

Sorry for getting back to you this late. Seems like this is a generic issue with npm installing git package globally. A quick search on this error message yields plenty results.

As a workaround you could clone the git library as normal user and then use sudo to install globally. Something along the lines of:

git clone https://github.com/mlaurijsse/homebridge-rflink-gateway sudo npm install -g homebridge-rflink-gateway/