Skip to content

Missing lockfile time entry causes incorrect minimumReleaseAge failure when using time-based resolution #11616

@pgoldberg

Description

@pgoldberg

Verify latest release

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

pnpm version

No response

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

Dependencies resolver

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

https://github.com/pgoldberg/pnpm-minimum-release-age-time-repro

Reproduction steps

Just run pnpm install in the repro

Describe the Bug

The minimumReleaseAge is set to 1440 and minimumReleaseAgeStrict is true. The state of the lockfile in the repro causes this error, which doesn't make much sense given the minimumReleaseAge is 1 day:

[ERR_PNPM_NO_MATURE_MATCHING_VERSION] Version 7.0.0-dev.20260406.1 (released 1 month ago) of @typescript/native-preview-win32-arm64 does not meet the minimumReleaseAge constraint

Expected Behavior

It should install successfully. I think there are a couple problems here. One is that the error message is misleading, because this is a time-based resolution error (albeit an incorrect one), rather than a minimumReleaseAge error. The other is that this should be able to install successfully, but because there isn't a time field populated for @typescript/native-preview in the lockfile, it fails. It's probably a bug that the time wasn't populated in the lockfile for @typescript/native-preview, but then there should be a better fallback for when it doesn't exist.

Which Node.js version are you using?

22.22.2

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions