TuyaAPI / cli

🔧 A CLI for Tuya devices
MIT License
261 stars 44 forks source link

scrolling testing text #143

Closed akeslo closed 2 years ago

akeslo commented 2 years ago

Hi any tuya-cli command just returns a scrolling "testing" string over and over again:

image

brightbloom commented 2 years ago

I see this, too. I've tried running in a fresh Alpine Linux docker container with the same result.

r0swell commented 2 years ago

Same results on my freebsd 12 box

subhashisbhowmik commented 2 years ago

+1

Same in Ubuntu, Ubuntu on RPi, RHEL, Windows, Windows WSL and Mac

Blacksli commented 2 years ago

+1 Same Ubuntu 20

subhashisbhowmik commented 2 years ago

I was able to circumvent this manually:

  1. Install nodejs
  2. Download the repo, cd into the directory, run npm install
  3. Run node cli.js ... (replace ... with your options)
akeslo commented 2 years ago

Same in Ubuntu, Ubuntu on RPi, RHEL, Windows, Windows WSL and Mac

Thanks workaround working for me

brightbloom commented 2 years ago

Same here, workaround is OK for me on MacOS and in the Alpine Docker image.

codetheweb commented 2 years ago

At first I was absolutely sure this was unusually high-effort spam. Then I reproduced the exact same issue in my terminal.

It appears that the maintainer of a popular terminal library decided to pull a prank on all the 22m installers of his package. It seems like there might be some other weird stuff going on with him so I hope he gets better / finds some help for whatever he's going through.

Regardless, this should be fixed in v1.18.3.

subhashisbhowmik commented 2 years ago

@codetheweb I'm new to node (read: learnt yesterday), do you know why it worked with the workaround I mentioned? How can I reproduce this after pulling the repo?

codetheweb commented 2 years ago

To be honest, I'm not really sure why that worked. colors@1.4.1 is the broken version, colors@1.4.0 is a previously working version--so my fix was to change "colors": "^1.4.0" in package.json (which matched colors@1.4.1) to just "colors": "1.4.0" (which does not match colors@1.4.1).

Not sure why npm module resolution would be slightly different between a globally installed version of @tuyapi/cli and a local version.

subhashisbhowmik commented 2 years ago

Not sure why npm module resolution would be slightly different between a globally installed version of @tuyapi/cli and a local version.

I think I got it, it is because the package-lock file in the repo contains colors@1.4.0, which probably gets ignored during the release. But again, I'm not really familiar with node and npm.