codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.05k stars 337 forks source link

not able to install tuyapi/cli #453

Open ajocius opened 3 years ago

ajocius commented 3 years ago

I have RPI 3b version with hassio. Tried to install tuyapi with following command: sudo npm i @tuyapi/cli -g

Below is list of errors that I got

pi@raspberrypi:~ $ sudo npm i @tuyapi/cli -g
The authenticity of host 'github.com (140.82.121.4)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
\-e you sure you want to continue connecting (yes/no)? /
npm ERR! git clone git@github.com:tuyapi/cli Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-tuyapi-cli-3083bead'...
npm ERR! git clone git@github.com:tuyapi/cli Warning: Permanently added 'github.com,140.82.121.4' (RSA) to the list of known hosts.
npm ERR! git clone git@github.com:tuyapi/cli Permission denied (publickey).
npm ERR! git clone git@github.com:tuyapi/cli fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:tuyapi/cli 
npm ERR! git clone git@github.com:tuyapi/cli Please make sure you have the correct access rights
npm ERR! git clone git@github.com:tuyapi/cli and the repository exists.
npm ERR! addLocal Could not install tuyapi/cli
npm ERR! Error: ENOENT: no such file or directory, stat 'tuyapi/cli'
npm ERR!     at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.9.59-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "i" "@tuyapi/cli" "-g"
npm ERR! cwd /home/pi
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! path tuyapi/cli
npm ERR! syscall stat
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/npm-debug.log
npm ERR! not ok code 0
codetheweb commented 3 years ago

This is an issue with your config, not this package. I'm not sure why NPM is trying to clone from GitHub instead of installing from NPM.

Check the output of npm config list, it may help you debug further.