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
'pnpm patch' not working with git urls + commit hash #7196
Comments
Hi, we can run |
Thanks for the reply, but this does not work because the package.json version in the specified commit does not exist yet locally (it was never downloaded I assume) because when I do If I run ERR_PNPM_NO_MATCHING_VERSION No matching version found for @company/lib@1.2.3 |
Is there no version |
No indeed, there's no 1.2.3 version in the npm registry (yet). Make sense that this is the underlying problem. It was not clear from the pnpm patch documentation that this is a requirement. It would be nice to have this working in the future because I think its a valid use case. Just imagine you want to use a yet unpublished version of a library but you additionally need to patch it. Feels not that uncommon :) |
Verify latest release
pnpm version
No response
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
No response
Reproduction steps
Describe the Bug
We're using an 3rd party dependency via github urls + commit hash like in the following example:
"@company/lib": "git+ssh://git@github.com/company/project#e0f3a5b85f4ee2d3b3ea591ae8e25c7dc7686788"
I wanted to use "pnpm patch" to apply a small temporary patch to that version but unfortunately it does not work because it seems I have to call "pnpm patch @company/lib@version" but there's no version.
The error I'm getting is: " ERR_PNPM_NO_MATCHING_VERSION No matching version found for xxx"
Expected Behavior
Dependencies from Git urls can be patched using pnpm patch.
Which Node.js version are you using?
18.13.
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: