Skip to content

Prompt for package manager selection in the interactive ng new stepper #33610

Description

@quinnjr

Command

new

Description

`ng new` supports `--package-manager <npm|yarn|pnpm|bun>` as a flag, but when run interactively (no flags), the CLI wizard never asks the user to choose a package manager. Looking at `packages/schematics/angular/ng-new/schema.json`, other options like `routing`, `style`, `ssr`, and `zoneless` all have an `x-prompt` so they're surfaced as interactive questions, but `packageManager` has none:

```json
"packageManager": {
"description": "The package manager used to install dependencies.",
"type": "string",
"enum": ["npm", "yarn", "pnpm", "bun"]
}
```

As a result, users running the interactive stepper have no way to pick their package manager as part of that flow — it's silently inferred (e.g. from existing lockfiles/what's on PATH) or defaults to npm, and the only way to control it is to already know about and pass the `--package-manager` flag up front.

Describe the solution you'd like

Add an `x-prompt` (list/select prompt) for `packageManager` in `ng-new/schema.json`, similar to how `style` and `ssr` are prompted, so the interactive `ng new` stepper asks the user to choose between npm/yarn/pnpm/bun (respecting `--package-manager` / `--skip-install` when explicitly provided, so the prompt is skipped in non-interactive/CI use).

Describe alternatives you've considered

Continuing to require users to know about and pass `--package-manager` explicitly, or to configure a default via `.npmrc`/global CLI config — both require prior knowledge the interactive flow doesn't surface.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions