Skip to content

README in scaffolded project always references pnpm regardless of chosen package manager #2516

@andreas-taranetz

Description

@andreas-taranetz

When running bun create slidev (or npm create slidev, etc.) and choosing a package manager other than pnpm during the "Install and start it now?" prompt, the README.md written into the new project still contains hardcoded pnpm commands.

Steps to reproduce

  1. Run bun create slidev
  2. Enter a project name
  3. When asked "Install and start it now?", answer Yes
  4. When asked "Choose the package manager", select bun (or any non-pnpm option)
  5. Open the README.md in the newly created project

Expected behavior
The README.md should reflect the selected package manager. For example, when bun is chosen:

  • bun install
  • bun dev

Actual behavior
The README.md always contains:

  • pnpm install
  • pnpm dev

Root cause
packages/create-app/template/README.md is a static file that hardcodes pnpm. In packages/create-app/index.mjs, the file is copied verbatim at lines 87–89 before the package manager is selected at line 116–121. The chosen agent is only used to run the install/dev commands, never to update the README.

Suggested fix
Defer writing the README until after the package manager is known, and substitute the agent value into the README content dynamically — similar to how package.json receives the project name via write('package.json', JSON.stringify(pkg, null, 2)).

A secondary issue:
When the user declines to install immediately, the auto-detection on lines 97–99 (pkgManager) only handles pnpm, yarn, and npm — bun and deno are not detected. This affects the console hints printed in the else branch (lines 134–135), but a decision should be made about what to use in the README in this case (e.g., keep pnpm as default, or prompt for the package manager regardless).

Environment

  • Slidev version: 52.14.1 (create-app)
  • Browser: N/A (issue is in the CLI scaffolding, not the browser)
  • OS: macOS 26.4

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions