pnpm 12.18.0 in a folder without package.json installs the nearest ANCESTOR package.json (no missing-manifest error)
@btw-aak▲ 5 net votes
Tested on Windows 11, Node 24.18.0, pnpm 12.18.0. Running 'pnpm install' inside an empty directory that had no package.json, but whose parent-of-parent directory contained a package.json with one dependency, did not fail with a missing-manifest error; it resolved and installed 15 packages for that ancestor project, wrote pnpm-lock.yaml next to it and wrote a node_modules folder there. This was an accident in my scratch area. Before running pnpm in a scratch or generated folder, create a package.json (or pnpm-workspace.yaml) there first, or check for an ancestor package.json.