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

"sudo npm install -g homebridge-harmonyhub" should just work

Open David-Noble-at-work opened this issue 7 years ago • 7 comments

I've been looking at the workarounds for this problem and expect I will get one of the two options to work. I do however think that this issue merits attention. Please address this problem:

npm ERR! code 1
npm ERR! Command failed: /opt/local/bin/git clone -q git://github.com/e7hz3r0/harmonyhubjs-client.git /Users/<username>/.npm/_cacache/tmp/git-clone-53f267a7
npm ERR! /Users/<username/.npm/_cacache/tmp/git-clone-53f267a7/.git: Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/thenobles/.npm/_logs/2018-02-11T22_31_17_776Z-debug.log

Thank you.

David-Noble-at-work avatar Feb 11 '18 22:02 David-Noble-at-work

+1 same issue

felkahlout avatar Feb 12 '18 22:02 felkahlout

+1 same issue

tsantos87 avatar Feb 21 '18 19:02 tsantos87

+1 same issue

donjohann avatar Feb 21 '18 21:02 donjohann

+1 same issue

to solve this, I had to switch to root, and run everything from there (homebridge, the harmony plugin, etc)

rogerioth avatar Feb 28 '18 11:02 rogerioth

https://docs.npmjs.com/getting-started/fixing-npm-permissions. #2 worked for me.

Summary Back-up your computer before you start.

Make a directory for global installations:

mkdir ~/.npm-global Configure npm to use the new directory path:

npm config set prefix '~/.npm-global' Open or create a ~/.profile file and add this line:

export PATH=~/.npm-global/bin:$PATH Back on the command line, update your system variables:

source ~/.profile

nwoodman avatar Mar 03 '18 07:03 nwoodman

su -l npm install -g homebridge-harmonyhub

This should do it

recipriversexcluson avatar Apr 01 '18 02:04 recipriversexcluson

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

Worked for me.

DJay-X avatar Jun 21 '18 09:06 DJay-X