You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash when adding contributors and there is no content before the all contributors comment tag #376
Create CONTRIBUTORS.md that looks like this, with nothing at the top of the file before the comment:
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --><!-- prettier-ignore-start --><!-- markdownlint-disable --><!-- markdownlint-restore --><!-- prettier-ignore-end --><!-- ALL-CONTRIBUTORS-LIST:END -->
In .all-contributorsrc, point to that file:
"files": ["CONTRIBUTORS.md"],
Run all-contributors add someusername code to try to add a contributor
I get this error:
RangeError: Invalid count value: -1
at String.repeat (<anonymous>)
at /usr/local/lib/node_modules/all-contributors-cli/dist/generate/index.js:19:186
at /usr/local/lib/node_modules/all-contributors-cli/node_modules/lodash/lodash.min.js:57:276
at module.exports (/usr/local/lib/node_modules/all-contributors-cli/dist/generate/index.js:75:78)
at /usr/local/lib/node_modules/all-contributors-cli/dist/cli.js:33:28
at async Promise.all (index 0)
Expected behavior
It should be able to add an entry to the table.
Additional context
Adding anything beforehand, e.g. a title to the markdown file, makes it work.
I think there's just an assumption that there is content before, so it tries to index a string at index -1. Maybe wrapping in Math.max(idx, 0) would be sufficient.
Hey there @davepagurek 👋🏻 i just wanted to drop in and say hello, and let you know that we are currently rebooting this project. The last release on NPM is ~3 years old, I think, and we need to update the infrastructure first. Right now i do know that the build from main branch is also broken but we are working on fixing this all, updating dependencies, etc. i've noted that this is a bug and once we upgrage some of the infra, revisit the tests and such and get everything working and secure again, we will come back to some of these bugs and try to sort those out as well! thank you so much for opening this issue!!
Activity
lwasser commentedon Jan 27, 2026
@all-contributors please add @davepagurek for bug
Hey there @davepagurek 👋🏻 i just wanted to drop in and say hello, and let you know that we are currently rebooting this project. The last release on NPM is ~3 years old, I think, and we need to update the infrastructure first. Right now i do know that the build from main branch is also broken but we are working on fixing this all, updating dependencies, etc. i've noted that this is a bug and once we upgrage some of the infra, revisit the tests and such and get everything working and secure again, we will come back to some of these bugs and try to sort those out as well! thank you so much for opening this issue!!
allcontributors commentedon Jan 27, 2026
@lwasser
I've put up a pull request to add @davepagurek! 🎉
fix: avoid crash when contributors tag is at the start of a file (all…