homebridge-nest icon indicating copy to clipboard operation
homebridge-nest copied to clipboard

Can't be downloaded?!

Open ghost opened this issue 8 years ago • 24 comments

Hello,

I'm getting the following issues when I'm trying to install any of the nest packages.

npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone -q https://github.com/kraigm/unofficial_nodejs_nest.git /root/.npm/_cacache/tmp/git-clone-993140f0
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-993140f0': Permission denied

I have looked around and tried all the given solutions over the net, but it's something only with the nest packages. Any other is installed easily.

Do you happen to have an alternate solution to install?

Thanks, Marcell

ghost avatar Aug 31 '17 10:08 ghost

Add ‘sudo’ to npm install -g

gerarddvb avatar Aug 31 '17 15:08 gerarddvb

Im getting the same issue. I also tried to install with yarn, that did succeed, however it is not getting put in the node_modules folder.

bassrock avatar Sep 02 '17 21:09 bassrock

any solution ?

roe1974 avatar Sep 25 '17 14:09 roe1974

Same problem here.

sudo npm install -g homebridge-nest

npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone -q https://github.com/kraigm/unofficial_nodejs_nest.git /root/.npm/_cacache/tmp/git-clone-0c8b9505
npm ERR! fatal: Konnte führende Verzeichnisse von '/root/.npm/_cacache/tmp/git-clone-0c8b9505' nicht erstellen.: Keine Berechtigung
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-10-01T06_39_43_505Z-debug.log

DJay-X avatar Oct 01 '17 06:10 DJay-X

I am also seeing the same issue. Other plugins are working fine.

npm ERR! Command failed: /usr/bin/git clone -q https://github.com/kraigm/unofficial_nodejs_nest.git /root/.npm/_cacache/tmp/git-clone-f9f314f6 npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f9f314f6': Permission denied

benfysh avatar Oct 02 '17 15:10 benfysh

Same issue when attempting to update from 1.1.2 to 1.1.3.

Tried: sudo npm install -g homebridge-nest & sudo npm update -g homebridge-nest

other plugins and homebridge updated without issue.

Anyone know what might be causing this or how to fix it?

jocamero avatar Oct 02 '17 21:10 jocamero

i think its due to an error in https://github.com/kraigm/unofficial_nodejs_nest.git only @KraigM can solve this ....

roe1974 avatar Oct 03 '17 10:10 roe1974

anyone tried:

sudo chown -R $USER /usr/local && npm install homebridge-nest -g

??

roe1974 avatar Oct 03 '17 12:10 roe1974

You guys are getting directory permission issues. It might be related to the fact that that dependency has to be pulled from GitHub due to the fact that the fix I submitted a long time ago has still not been released to npm.

KraigM avatar Oct 03 '17 12:10 KraigM

so is there a workaround for us ?

roe1974 avatar Oct 03 '17 12:10 roe1974

Now technically that dependency is not needed anymore, if you are using the new API stuff. It is only kept around for legacy purposes (version zero users).

KraigM avatar Oct 03 '17 12:10 KraigM

ok, but the dependency is in the package.json ....

roe1974 avatar Oct 03 '17 12:10 roe1974

Yes... because if I remove it then anyone still using the old way would break due to a missing package

KraigM avatar Oct 03 '17 12:10 KraigM

Personally, I strongly suggest switching to nvm as many problems like this (file permission issues) are handled. IMPORTANT: After switching, you no longer use sudo in any of the commands

Switching does unfortunately require you to reinstall homebridge/plugins but it will use your same config as it did before

KraigM avatar Oct 03 '17 12:10 KraigM

hmmmm .... sounds not so good.. because homebridge and all plugins are working now perfect... no other way ? ;-) ... and users still using the old way would break during update/install ... or while the plugin is running ?

... and NVM is not even simple to install ;-)

roe1974 avatar Oct 03 '17 12:10 roe1974

Another solution/workaround may be to follow npm's guide on permission issues: https://docs.npmjs.com/getting-started/fixing-npm-permissions

It sounds like there is a permission issue on the folder '/root/.npm/' (as it specifically says on the error). What happens when you run npm config get prefix?

KraigM avatar Oct 03 '17 13:10 KraigM

/usr so you mean try option 2 from the link........?

roe1974 avatar Oct 03 '17 13:10 roe1974

Seems to be an issue with npm: https://github.com/npm/npm/issues/16898

KraigM avatar Oct 03 '17 13:10 KraigM

can you change the package.json for 1-2h ... just for installing it ? ... or is there a problem later ?

roe1974 avatar Oct 03 '17 13:10 roe1974

Not really. For one, it is not as simple as removing the dependency since the legacy functionality is still being loaded atm. Also, npm doesn't really work like that.

KraigM avatar Oct 03 '17 13:10 KraigM

But I'm nice and I removed the legacy handling and tested it for you. Since you can't pull it from git, I released it as version 1.1.3-nolegacy. You can install using:

sudo npm install -g [email protected] 

Since this is not an actual issue, but just a work around for your file permission issues, I do not want to officially release this without making it a major version (like 2.0.0).

KraigM avatar Oct 03 '17 13:10 KraigM

perfect !!! install works ;-)

roe1974 avatar Oct 03 '17 14:10 roe1974

I am so thankful for your work KraigM. Been struggling with this as well and glad to see a workaround at least for the time being.

travmo avatar Oct 03 '17 14:10 travmo

my Nest sensors are back to homekit :-))))))))) @KraigM ..... anyway to donate for your project/work ?

regards, richard

roe1974 avatar Oct 03 '17 14:10 roe1974