binsentsu / am43-ctrl

Node Util for controlling an AM43 Blinds Drive Cover, either over MQTT or via a HTTP API
44 stars 25 forks source link

Unable to install on RSPI 3 #7

Closed bean007007007 closed 4 years ago

bean007007007 commented 4 years ago

sudo npm install -g https://github.com/binsentsu/am43-ctrl npm ERR! code 128 npm ERR! Command failed: git clone --mirror -q https://github.com/binsentsu/am43-ctrl.git /root/.npm/_cacache/tmp/git-clone-ee07ae50/.git npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-ee07ae50/.git' npm ERR!

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-03-05T19_11_59_142Z-debug.log


   File: /root/.npm/_logs/2020-03-05T19_11_59_142Z-debug.log                

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'https://github.com/binsentsu/am43-ctrl' ] 2 info using npm@6.14.2 3 info using node@v10.19.0 4 verbose npm-session 92d9549b04dae94f 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 silly fetchPackageMetaData error for git+https://github.com/binsentsu/am43-ct$ 7 silly fetchPackageMetaData fatal: could not create leading directories of '/r$ 8 timing stage:rollbackFailedOptional Completed in 3ms 9 timing stage:runTopLevelLifecycles Completed in 1313ms 10 verbose stack Error: Command failed: git clone --mirror -q https://github.co$ 10 verbose stack fatal: could not create leading directories of '/root/.npm/_ca$ 10 verbose stack 10 verbose stack at ChildProcess.exithandler (child_process.js:294:12) 10 verbose stack at maybeClose (internal/child_process.js:982:16) 10 verbose stack at Socket.stream.socket.on (internal/child_process.js:389:$ 10 verbose stack at Socket.emit (events.js:198:13) 10 verbose stack at Pipe._handle.close (net.js:607:12) 11 verbose cwd /home/pi 12 verbose Linux 4.19.66-v7+ 13 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "https://github.c$ 14 verbose node v10.19.0 15 verbose npm v6.14.2 16 error code 128 17 error Command failed: git clone --mirror -q https://github.com/binsentsu/am4$ 17 error fatal: could not create leading directories of '/root/.npm/_cacache/tm$ 18 verbose exit [ 1, true ]

binsentsu commented 4 years ago

Can be a problem with global install. Try following steps (the npm install is without sudo):

make a new directory in your /home/pi cd into newly created directory run npm install https://github.com/binsentsu/am43-ctrl cd into node_modules/.bin run by using: sudo ./am43ctrl … like in readme.

binsentsu commented 4 years ago

closed because of inactivity

roblomq commented 3 years ago

Sorry for the noob question but in the helpfile is stated "sudo am43ctrl" but is should be "sudo ./am43ctrl", is that correct?

binsentsu commented 3 years ago

Yes. It's indeed ./ for an executable.