-
-
Notifications
You must be signed in to change notification settings - Fork 945
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
Absolute paths in pnpm-lock.yml when using resolutions #7858
Comments
The idiomatic pnpm workflow is |
We should be able to fix this probably.
What doesn't work with v9? |
Thank you for looking at this! To answer your question, this is the error I get trying to run 9.0.0-alpha.0. It's strange, because our node version is greater than what is listed. ERROR: This version of pnpm requires at least Node.js v16.14
Our build system was previously designed with --preserve-symlinks which does not work with PNPM, so we've been converting everything to work without this flag. However, some logic still relied on the old behavior, so using file: "hardlink" instead of "symlink" is helping us to work around the issue in the short term until we can update our build system. Sometimes we also want to override a package from the NPM feed with a local copy, and did this previously in yarn with no issues with the lock file (it only used relative path from workspace root), so I'm optimistic whether PNPM could support this scenario. |
Verify latest release
pnpm version
8.15.5
Which area(s) of pnpm are affected? (leave empty if unsure)
Lockfile
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Describe the Bug
An absolute path is baked into the pnpm-lock.yaml:
Expected Behavior
Adding a resolution (override) using a file: path bakes an absolute path ( specifier: file:C:\git\test\my-package ) into the pnpm-lock.yaml file. This is problematic because it makes a merge conflict every time a developer runs pnpm install on a different machine and makes it difficult to use PNPM in an organization.
Expected behavior is that there should only be relative paths from the workspace root in the lockfile. We would appreciate a workaround or bug fix for this issue. Thanks.
v9 is in alpha and does not work yet for us, so we are using the latest version of v8 as of last week.
Which Node.js version are you using?
v16.15.1
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: