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 stuck in windows due to long file path #7355
Comments
same issue here |
I guess we'll optimize it in the next major version of pnpm. I have a PR open already: #7317 However, I don't understand why you get the |
Thanks, it is very helpful, hope the fix 7317 can be in next major version, pnpm is excellent, but our project can not use the tool due to this problem. |
also having this issue, spent 2 days trying to figure out why our project worked fine on my mac and not on my coworkers machines. Turns out our file names are long, and pnpm makes crazy nested path lengths. Even with long file paths turned on, it would still blow up. |
I find the #7317 is closed and will not be integrated to V9 |
The issue is still not solved for all users by that fix but it makes the directories in |
Also, could you just enable long paths? https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later |
Thanks for advice, I remember that my collogues already try to enable the long path. but it still could not work. But I will try again. When I change the code and set MAX_LENGTH_WITHOUT_HASH to lower value, then the problem is gone. Maybe it could provide a choice in user side by extra parameter on the pnpm install? |
To what value do you change MAX_LENGTH_WITHOUT_HASH? |
The bigger value, I did not have a try. |
🚢 9.1.0-0 |
Verify latest release
pnpm version
8.11.0
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Create a web project in windows
In Package.json look like follow, only install @angular/material
"dependencies": {
"@angular/material": "16.1.3"
},
Pnpm install
Stuck for 6 minutes
Describe the Bug
Pnpm install need a so long time.
After debug the pnpm, the block happen on the follow code( fs.renameSync(oldPath, newPath);)
Pnpm will try to rename the folder for each dependency.
e.g. from
D:\.....s\.pnpm\registry.npmmirror.com+@angular+material@16.1.3_@angular+animations@17.0.4_@angular+cdk@16.1.dbljk25fedifsmmc22b3hvapj4\node_modules\@angular\material_tmp_48644
to
D:\.....\.pnpm\registry.npmmirror.com+@angular+material@16.1.3@angular+animations@17.0.4_@angular+cdk@16.1.dbljk25fedifsmmc22b3hvapj4\node_modules\@angular\material
The path is so long exceed the limit of Max path in windows.
e.g.
D:....\mui\node_modules.pnpm@angular+material@16.1.3@angular+animations@17.0.4_@angular+cdk@16.1.3_@angular+common@17.0._p6gpzivryg5zt4x4wcyv73polm\node_modules@angular\material\esm2022\core\selection\pseudo-checkbox
which cause the rename operation stuck
Expected Behavior
For whole project
pnpm install cost 50 minutes, it is too long
npm install will only cost about 6 minutes.
Which Node.js version are you using?
18.17.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: