`bun install` occasionally fails with parallel runs
What version of Bun is running?
1.1.21
What platform is your computer?
linux / macOS
What steps can reproduce the bug?
echo run1 run2 run3 run4 run5 | xargs -n 1 -P 5 sh -c 'bun install'
What is the expected behavior?
It would be great if bun can run parallel.
I guess there is some central contention, maybe it can be resolved using locks.
What do you see instead?
No response
Additional information
When bun is parallelly ran (on multiple projects to save time), it tends to fails for some of the executions.
The error message(s) are of the pattern: error: Failed to link {npm-package-name}: EEXIST
We have tests for this, but the tests focus on install rather than linking bins. cc @dylan-conway
I am experiencing this using @sentry/cli
One example from docs:
thomas: error: Failed to link @sentry/cli: EEXIST
polar: Saved lockfile
polar: error: could not determine executable to run for package @sentry/cli
To try and get around it I run bunx @sentry/cli --version not in parallel at the start of CI to install it so later bunx runs shouldn't try and re-install but maybe thats not doing what I want it to.
This just started happening even though this code hasn't changes in quite a while, if I downgrade bun will it work?
Note: This is our production pipeline.
Still hitting this issue.
maybe do: bun i --force
We need to find root cause of that issue. https://github.com/link-assistant/agent/pull/73 can be used for reference.