Invalid inquirer API access when running `npx all-contributors init` with v7.0.0
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- cli
Research direction
Start by reading the prompt definitions in dist/cli.js and dist/init/prompt.js, especially the three call sites listed in the report, and check how the project handles CLI tests. Reproduce with npx all-contributors or npx all-contributors init using Inquirer 14. The issue is done when the affected prompts render and both commands continue without an unknown prompt type error.
Written by the indexing model from the issue text.
Description
[!NOTE]
I have ran into this issue after upgrading from[email protected]to the latest v7 release.I have asked LLM to perform an initial debug and generate the following report, which I have manually checked and modified for clarity.
Describe the bug
In v7.0.0, every interactive prompt that uses type: 'list' crashes with:
UnknownPromptTypeError: Prompt type "list" is not registered. Available prompt types: checkbox, confirm, editor, expand, input, number, password, rawlist, search, select
[email protected] depends on inquirer ^14.0.2, but the source still asks for the list prompt type, which inquirer 14 no longer registers (the replacement is select). The affected call sites are:
dist/cli.js:155(the "What do you want to do?" menu, shown when no command is given)dist/init/prompt.js:21(repository type, used byinit)dist/init/prompt.js:86
In practice, running all-contributors with no command, or running all-contributors init, fails as soon as it reaches one of these prompts.
To Reproduce
Steps to reproduce the behavior:
- Create a new directory and install the CLI:
mkdir ac-repro && cd ac-repro git init && git remote add origin https://github.com/example/repo.git npm init -y npm i [email protected] - Run the CLI without a command:
npx all-contributors - See the error:
UnknownPromptTypeError: Prompt type "list" is not registered. Available prompt types: checkbox, confirm, editor, expand, input, number, password, rawlist, search, select at PromptsRunner.prepareQuestion (.../node_modules/inquirer/dist/ui/prompt.js:156:19) at PromptsRunner.fetchAnswer (.../node_modules/inquirer/dist/ui/prompt.js:202:37) at PromptsRunner.run (.../node_modules/inquirer/dist/ui/prompt.js:118:47) at async run (.../node_modules/all-contributors-cli/dist/cli.js:184:21)
npx all-contributors init fails the same way once it reaches the "What is the repository type?" question.
Expected behavior
The prompts render and the command continues. Either the list prompt types should be changed to select, or the inquirer dependency should stay on a version that still registers list.
Screenshots
Not applicable, the full error output is above.
Additional context
- Resolved version:
[email protected] - Node.js: v24.22.1
- I checked whether
listis registered in each major by callinginquirer.prompt([{ type: 'list', ... }]). Inquirer 12 and 13 render the prompt, and inquirer 14 throwsUnknownPromptTypeError. So the break comes from the^14.0.2range in 7.0.0. [email protected](which depends oninquirer ^7.3.3) does not have this problem.- 7.0.0 is currently the
latestdist-tag on npm, so anyone who installs the package without pinning a version gets this.
- Dominant language
- JavaScript
- Stars
- 424
- Forks
- 151
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from all-contributors/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
all-contributors/cli#587 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
all-contributors/cli#584 ·
Maintainers usually reply within 1 day
-
[BUG]: Markdown provided in `types[key].link` is injected as-is into HTMLAnchorElement's href attributePossibly taken @theworker02 claimed this 34 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 61/100
all-contributors/cli#520 · 1 comment ·
Maintainers usually reply within 1 day
-
Additional Config File OptionsMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
all-contributors/cli#499 · 2 comments · 6 reactions ·
Maintainers usually reply within 1 day
-
Consider adding a PR title checker to enforce angular / conventional commitsMay be free again A pull request for this issue was closed without being merged. Opentype: ci type: enhancement type: infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
all-contributors/cli#482 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in all-contributors/cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
account: profile bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 5 days
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
linagora/cozy-client#1777 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
NanmiCoder/dsh-agent-teams#326 ·
Maintainers usually reply within 1 day
-
[guide] AGENTS.md claims the coverage gate, e2e and full lint run on every PR after ADR 0011 focused validationPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
cncf/endusers#2006 · 1 comment ·
Maintainers usually reply within 1 day