-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
compatible problem with pnpm when multiple esbuild version exists #963
Comments
I think I find the reason, because esbuild modify bin file in post-install script, which violates pnpm's the hard-link & content-hash strategy, because different version of esbuild's bin's content is same before post-install , so different esbuild shared same hard-link of the same file(content-hash&hard-link strategy), but in post-install the both change their bin file, but they use the same hard-link ,the last modify will modify the result for both version, which will cause one version get wrong result, I currently change hard-link strategy to copy(mac not support COW currently), but I think esbuild could change the strategy so as to be compatible with pnpm's hard-link strategy. |
I made a change that I think might fix this: #970. It uses |
could you publish an alpha version so I can test it , there's somethings wrong with pnpm's link so it's not easy to test an unpublished version, and why not create an bin file then make bin entry points to the created bin file instead of replace the bin file |
I'm just going to try shipping it normally and see how that goes. You can try it out in the next release. |
This was published btw. Let me know if it's working for you now or not. |
It seems that pnpm will do some special tricks to bin files, which will cause esbuild fails when multiple esbuild version exisits,(it may be a bug of pnpm pnpm/pnpm#3238), but It's kind of unusual to make js entry files rely on bin files(it's usual that bin file relys on main js entry files), maybe not put the real bin into bin folder could solve the issue.
The text was updated successfully, but these errors were encountered: