Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY when using local package as dependency #6332

Closed
MaSch0212 opened this issue Mar 31, 2023 · 3 comments · Fixed by #6350
Closed

ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY when using local package as dependency #6332

MaSch0212 opened this issue Mar 31, 2023 · 3 comments · Fixed by #6350

Comments

@MaSch0212
Copy link

Last pnpm version that worked:

7.30.5

pnpm version:

8.1.0

Code to reproduce the issue:

I uploaded a repro repository for this here: https://github.com/MaSch0212/pnpm-local-package-issue

Expected behavior:

  1. Add a dependency to a folder, e.g.: "@types/bpmn-js": "file:./@types/bpmn-js"
  2. Run pnpm install
    • It runs without issues.
  3. Run pnpm install --frozen-lockfile
    • Should run without issues.

Actual behavior:

  1. Add a dependency to a folder, e.g.: "@types/bpmn-js": "file:./@types/bpmn-js"
  2. Run pnpm install
    • It runs without issues.
  3. Run pnpm install --frozen-lockfile
    • Shows ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY error

Running any other pnpm install command afterwards produces the ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY error. In this example I run pnpm install --frozen-lockfile to simulate a build pipeline:
image

After running pnpm install once, you will always get the error from that point on (unless the local package dependency is removed):
image

Additional information:

  • node -v prints: v16.18.1
  • Windows, macOS, or Linux?: Windows
@brionmario
Copy link

brionmario commented Mar 31, 2023

pnpm v8 adopts the new Lockfile v6. You may have to update your lock files to adhere with the changes.

Ref: https://github.com/orgs/pnpm/discussions/6292

@MaSch0212
Copy link
Author

I managed to reproduce this issue with a completely fresh repository (see "Code to reproduce the issue"). So the lockfile was created by pnpm v8.1.0, therefore the lockfile is already v6.

@zkochan
Copy link
Member

zkochan commented Apr 3, 2023

I'll check this.

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

Successfully merging a pull request may close this issue.

3 participants