Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid count value #157

Closed
andromidasj opened this issue Apr 10, 2023 · 6 comments
Closed

Invalid count value #157

andromidasj opened this issue Apr 10, 2023 · 6 comments

Comments

@andromidasj
Copy link

andromidasj commented Apr 10, 2023

Describe the bug
Whenever running npx npkill, with or without option flags, I get an Invalid count value error. Using the arrow keys to select 'up' or 'down', the error count increments, and upon inspecting the errors by hitting e, they are all the same error: RangeError: Invalid count value on the 0th index, and Invalid count value on the rest. (See screenshot below.)

At this point, everything is broken and unresponsive, and needs to be cancelled with CTRL+C. This is reproducible for me on three different terminals: macOS Terminal, Tabby, and Warp.

To Reproduce
Steps to reproduce the behavior:

  1. Running npx npkill
  2. Wait for scanning, and when the progress bar is about 2/3 the way through, it'll show a message at the top 1 error. 'e' to see

Expected behavior
I expect the utility to run without errors.

Screenshots
image
image

  • OS: macOS 13.3.1 (22E261)
  • Version [ npkill -v ]: v0.11.1%

Additional context
This happens with or without flags (-x, -s size, etc). While troubleshooting, and on my first try with the built-in macOS terminal, it actually performed a successful run-through. I then decided to add the flags above, and then got the same error. When trying again without any flags, I could not reproduce a successful run-through again, and it would fail every time.

@andromidasj
Copy link
Author

Update: My first run-through of npx npkill (with no flags) on iTerm worked without a problem. I deleted a couple of folders presumably successfully, but then when I resized the screen all the options disappeared (guess that's on me?), but then I'd get the same errors as the original post.

I hit CTRL+C, ran npx npkill one more time, and now it fails just like the other ones.

@andromidasj
Copy link
Author

One more troubleshooting update: looks like a single repository was causing npkill to crash. When I excluded a specific repo using the -E flag, it reliably works now! The repo in question was a cloned repo from https://github.com/sct/overseerr. Not sure why it broke npkill though.

@zaldih
Copy link
Member

zaldih commented Apr 11, 2023

Thank you very much for opening the issue with all the details!

It seems that the same problem is described the issue #149 .
I just released version 0.11.3 which should fix the problem, could you check it?

@zaldih
Copy link
Member

zaldih commented Apr 17, 2023

Closing as resolved. If the problem persists feel free to reopen it.

@zaldih zaldih closed this as completed Apr 17, 2023
@mortalYoung
Copy link

I got this problem in v0.11.3. I have no idea about what happened.
image

@mortalYoung
Copy link

I found once I removed the node_modules under ./apps/myProject/(my project is based on turbo), It would work again!
Would you mind tell me the reason so I could prevent it happened again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants