Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Invalid inquirer API access when running `npx all-contributors init` with v7.0.0

Open Beginner friendly
#586 0 comments 0 reactions 0 assignees View on GitHub

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 by init)
  • 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:

  1. 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]
    
  2. Run the CLI without a command: npx all-contributors
  3. 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 list is registered in each major by calling inquirer.prompt([{ type: 'list', ... }]). Inquirer 12 and 13 render the prompt, and inquirer 14 throws UnknownPromptTypeError. So the break comes from the ^14.0.2 range in 7.0.0.
  • [email protected] (which depends on inquirer ^7.3.3) does not have this problem.
  • 7.0.0 is currently the latest dist-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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from all-contributors/cli

All issues in all-contributors/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.