Skip to content

pnpm run installs and writes pnpm-lock.yaml in a standalone project with no dependencies #16313

Description

@spyroslontos-nl

Last pnpm version that worked

12.5.1 (and 11.27.0)

pnpm version

12.7.0 (and 11.28.0)

Code to reproduce the issue

mkdir repro && cd repro
echo '{"name":"root","private":true}' > package.json
printf "packages:\n - 'pkgs/*'\n" > pnpm-workspace.yaml
mkdir -p pkgs/a scripts
echo '{"name":"a","version":"1.0.0"}' > pkgs/a/package.json
echo '{"scripts":{"hi":"echo hi"}}' > scripts/package.json
pnpm install
cd scripts && pnpm hi && ls

Expected behavior

pnpm run in a project with no dependencies runs the script and writes nothing, as in 12.5.1. pnpm's install already treats such a project as up to date (pnpm/pnpm#15884).

Actual behavior

it installs first and leaves node_modules and pnpm-lock.yaml behind. Paste the lockfile block and the version results list.

Additional information

the paragraphs about pnpm/pnpm#15125 and pnpm/pnpm#16275, the line about which cases pnpm/pnpm#15125's tests cover, and the discovery.rs link.

Node.js version

24.21.0

Operating System

Linux

Contributing a fix

  • I am working on a fix

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions