Open felkahlout opened 6 years ago
I am receiving errors as well, other plugins install fine
This is the error log 0 info it worked if it ends with ok 1 verbose cli [ '/opt/node/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'homebridge-harmonyhub' ] 2 info using npm@5.7.1 3 info using node@v8.10.0 4 verbose npm-session a5805390cbca8b8f 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 http fetch GET 304 https://registry.npmjs.org/homebridge-harmonyhub 2516ms (from cache) 8 silly pacote tag manifest for homebridge-harmonyhub@latest fetched in 3265ms 9 silly install loadIdealTree 10 silly install cloneCurrentTreeToIdealTree 11 silly install loadShrinkwrap 12 silly install loadAllDepsIntoIdealTree 13 silly resolveWithNewModule homebridge-harmonyhub@0.3.0-alpha.2 checking installable status 14 silly fetchPackageMetaData error for harmonyhubjs-client@github:e7hz3r0/harmonyhubjs-client No git binary found in $PATH 15 http fetch GET 304 https://registry.npmjs.org/debug 2765ms (from cache) 16 http fetch GET 304 https://registry.npmjs.org/queue 2785ms (from cache) 17 http fetch GET 304 https://registry.npmjs.org/inherits 2861ms (from cache) 18 silly pacote range manifest for debug@^2.2.0 fetched in 3056ms 19 silly resolveWithNewModule debug@2.6.9 checking installable status 20 http fetch GET 304 https://registry.npmjs.org/bluebird 3147ms (from cache) 21 http fetch GET 304 https://registry.npmjs.org/lodash 3130ms (from cache) 22 http fetch GET 304 https://registry.npmjs.org/harmonyhubjs-discover 3212ms (from cache) 23 silly pacote range manifest for queue@^3.1.0 fetched in 3286ms 24 silly resolveWithNewModule queue@3.1.0 checking installable status 25 silly pacote range manifest for inherits@^2.0.1 fetched in 3334ms 26 silly resolveWithNewModule inherits@2.0.3 checking installable status 27 silly pacote range manifest for bluebird@^3.3.4 fetched in 3581ms 28 silly resolveWithNewModule bluebird@3.5.1 checking installable status 29 silly pacote range manifest for lodash@^4.6 fetched in 3370ms 30 silly resolveWithNewModule lodash@4.17.5 checking installable status 31 silly pacote range manifest for harmonyhubjs-discover@^1.0.2 fetched in 3462ms 32 silly resolveWithNewModule harmonyhubjs-discover@1.1.1 checking installable status 33 verbose stack Error: No git binary found in $PATH 33 verbose stack at checkGit (/opt/node/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:204:17) 33 verbose stack at spawnGit (/opt/node/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:183:10) 33 verbose stack at pinflight (/opt/node/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:115:12) 33 verbose stack at /opt/node/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:29:24 33 verbose stack at Promise._execute (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/debuggability.js:303:9) 33 verbose stack at Promise._resolveFromExecutor (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:483:18) 33 verbose stack at new Promise (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:79:10) 33 verbose stack at _inflight (/opt/node/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:28:25) 33 verbose stack at /opt/node/lib/node_modules/npm/node_modules/promise-inflight/inflight.js:22:14 33 verbose stack at tryCatcher (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 33 verbose stack at Promise._settlePromiseFromHandler (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31) 33 verbose stack at Promise._settlePromise (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18) 33 verbose stack at Promise._settlePromiseCtx (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:606:10) 33 verbose stack at Async._drainQueue (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12) 33 verbose stack at Async._drainQueues (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10) 33 verbose stack at Immediate.Async.drainQueues (/opt/node/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14) 34 verbose cwd /home/pi 35 verbose Linux 4.9.80+ 36 verbose argv "/opt/node/bin/node" "/usr/bin/npm" "install" "-g" "homebridge-harmonyhub" 37 verbose node v8.10.0 38 verbose npm v5.7.1 39 error code ENOGIT 40 error No git binary found in $PATH 41 error Failed using git. 41 error Please check if you have git installed and in your PATH. 42 verbose exit [ 1, true ]
I was able to resolve this, I thought I had Git installed and when I checked, I did not. I installed GIT but then came accross a premission denied error when executing
sudo npm install -g homebridge-harmonyhub
Command failed: /usr/bin/git clone -q git://github.com/e7hz3r0/harmonyhubjs-client.git /root/.npm/_cacache/tmp/git-clone-17183d66 npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-17183d66': Permission denied I installed without elevated permissions and it installed without issue.
npm install -g homebridge-harmonyhub
this plugin is fucked up.. as root i get the error above, as non root i get a different error.. bullshit!
wow... when i add write permissions to everyone for /usr/lib/node_modules iam able to install it (do NOT do it!)
npm install -g homebridge-harmonyhub
worked thank u for tip
sudo chown -R $USER /usr/local && npm install homebridge-harmonyhub -g
Worked for me.
@DJay-X Never worked for me
my node files were in a different location,
this worked for me on a raspberry pi 3 sudo chown -R /usr/lib/node_modules/ && npm install homebridge-harmonyhub -g
using sudo with npm install did not work, but using normal npm install -g did after i gave myself permission
If I run without the sudo (npm install -g homebridge-harmonyhub), I get this error;
admin$ npm install -g homebridge-harmonyhub npm WARN deprecated node-xmpp-stanza@1.1.0: use @xmpp/xml package https://www.npmjs.com/package/@xmpp/xml npm WARN deprecated node-xmpp-jid@2.3.0: use @xmpp/jid package https://www.npmjs.com/package/@xmpp/jid npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator (though this is not recommended).
if I run sudo npm install -g homebridge-harmonyhub, I get this error;
sudo npm install -g homebridge-harmonyhub npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/e7hz3r0/harmonyhubjs-client.git /Users/admin/.npm/_cacache/tmp/git-clone-1cc013d9 npm ERR! /Users/admin/.npm/_cacache/tmp/git-clone-1cc013d9/.git: Permission denied npm ERR!
npm ERR! A complete log of this run can be found in: npm ERR! /Users/admin/.npm/_logs/2018-09-10T00_53_48_964Z-debug.log
ANYONE help - I've tried everything I know to do. Thank you in advance!
Try it with 2 sudo per here https://stackoverflow.com/questions/47996495/permission-denied-error-with-npm-install
sudo sudo npm install -g homebridge-harmonyhub
npm ERR! code 128 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/e7hz3r0/harmonyhubjs-client.git /root/.npm/_cacache/tmp/git-clone-816277a7 npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-816277a7': Permission denied npm ERR!
Running under nom vr 5.7.1.