Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pnpm deploy fails in v10.0.0 #9001

@daniele-orlando

Description

@daniele-orlando

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.0.0

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

https://github.com/user-attachments/files/18508754/pnpm-bug.zip

Reproduction steps

PREMISE

pnpm deploy in v9.15.4 works perfectly and pnpm deploy --legacy in v10.0.0 works perfectly too.
It is a bug only of the new deploy implementation.

  1. extract pnpm-bug.zip
  2. cd apps/rt3-web-service
  3. pnpm deploy --filter rt3-web-service ../../RELEASE
  4. observe failing with error

 ERROR  opts.lockfileDir is undefined.

pnpm: opts.lockfileDir is undefined.
at deployFromSharedLockfile (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:210594:15)
at Object.handler [as deploy] (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:210540:150)
at async /Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225361:21
at async main (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225320:34)
at async runPnpm (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225592:5)
at async /Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225584:7

  1. mv pnpm-workspace{.off,}.yaml
  2. rm -rf ../../RELEASE
  3. repeat pnpm deploy --filter rt3-web-service ../../RELEASE
  4. observe failing with error

 ERROR  Cannot read properties of undefined (reading 'dependencies')

pnpm: Cannot read properties of undefined (reading 'dependencies')
at createDeployFiles (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:210232:48)
at deployFromSharedLockfile (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:210602:69)
at async Object.handler [as deploy] (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:210540:144)
at async /Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225361:21
at async main (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225320:34)
at async runPnpm (/Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225592:5)
at async /Users/dan/.cache/node/corepack/v1/pnpm/10.0.0/dist/pnpm.cjs:225584:7

  1. mv pnpm-lock{,.off}.yaml
  2. rm -rf ../../RELEASE
  3. repeat pnpm deploy --filter rt3-web-service ../../RELEASE
  4. observe succeeding

Describe the Bug

pnpm deploy fails due to a lockfile that does work in v9.15.4 and that does work with v10.0.0 and --legacy option.

Expected Behavior

pnpm deploy should succeeds because the pnpm-lock.yaml file is a valid lock file.

Which Node.js version are you using?

22.13

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions