rooi / homebridge-lightwaverf

LightwaveRF plugin for HomeBridge
9 stars 7 forks source link

Plugin installation error due to git clone failure #41

Closed omarassil closed 3 years ago

omarassil commented 4 years ago

I'm getting these errors when installing this plugin. I haven't seen it in other plugin's installation: I tried with --unsafe option but still getting the same.

pi@raspberrypi:~ $ sudo npm install -g homebridge-lightwaverf
npm ERR! code 128
npm ERR! Command failed: git clone --mirror -q https://github.com/rooi/node-lightwaverf.git /root/.npm/_cacache/tmp/git-clone-1e38a613/.git
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-1e38a613/.git'
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-10-31T13_58_16_494Z-debug.log
rooi commented 4 years ago

Hi,

Could you try sudo -s before using your sudo npm install...

I’m not sure that it will work, but this indicates that it should: https://github.com/homespun/homebridge-platform-ring-video-doorbell/issues/54

Thanks,

Roy

Cardo1 commented 4 years ago

I'm trying to install the plugin on a new Raspberry Pi and unfortunately getting the same error. Tried unsafe-perm and sudo -s with no luck.

Cardo1 commented 4 years ago

It seems to be failing when trying to clone the node-lightwaverf dependency?

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/usr/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'homebridge-lightwaverf' 1 verbose cli ] 2 info using npm@6.12.1 3 info using node@v12.13.1 4 verbose npm-session 013b947c3fa46f52 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 http fetch GET 304 https://registry.npmjs.org/homebridge-lightwaverf 212ms (from cache) 8 silly pacote tag manifest for homebridge-lightwaverf@latest fetched in 239ms 9 timing stage:loadCurrentTree Completed in 277ms 10 silly install loadIdealTree 11 silly install cloneCurrentTreeToIdealTree 12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms 13 silly install loadShrinkwrap 14 timing stage:loadIdealTree:loadShrinkwrap Completed in 3ms 15 silly install loadAllDepsIntoIdealTree 16 silly resolveWithNewModule homebridge-lightwaverf@0.2.1 checking installable status 17 silly fetchPackageMetaData error for lightwaverf@git+https://github.com/rooi/node-lightwaverf.git Command failed: git clone --mirror -q https://github.com/rooi/node-lightwaverf.git /root/.npm/_cacache/tmp/gi$ 17 silly fetchPackageMetaData fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f4ac8592/.git' 18 timing stage:rollbackFailedOptional Completed in 1ms 19 timing stage:runTopLevelLifecycles Completed in 846ms 20 verbose stack Error: Command failed: git clone --mirror -q https://github.com/rooi/node-lightwaverf.git /root/.npm/_cacache/tmp/git-clone-f4ac8592/.git 20 verbose stack fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f4ac8592/.git' 20 verbose stack 20 verbose stack at ChildProcess.exithandler (child_process.js:295:12) 20 verbose stack at ChildProcess.emit (events.js:210:5) 20 verbose stack at maybeClose (internal/child_process.js:1021:16) 20 verbose stack at Socket. (internal/child_process.js:430:11) 20 verbose stack at Socket.emit (events.js:210:5) 20 verbose stack at Pipe. (net.js:659:12) 21 verbose cwd /home/pi 22 verbose Linux 4.19.75-v7l+ 23 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "homebridge-lightwaverf" 24 verbose node v12.13.1 25 verbose npm v6.12.1 26 error code 128 27 error Command failed: git clone --mirror -q https://github.com/rooi/node-lightwaverf.git /root/.npm/_cacache/tmp/git-clone-f4ac8592/.git 27 error fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f4ac8592/.git' 28 verbose exit [ 1, true ]

rooi commented 4 years ago

Hi,

Could you try to install git? There is a git pull in the dependency.

sudo apt install git sudo -s sudo npm i homebridge-lightwaverf -g --unsafe-perm

Roy

Cardo1 commented 4 years ago

Already had git installed, however although I'm sure I'd already tried the other commands, it worked when I just did it now. Very odd.

Thanks for the help.