npm "EEXIST: symlink" concurrent install in CI
npm tried to create a symlink (usually a CLI shim in node_modules/.bin) that already existed. This EEXIST on symlink is a classic concurrent-install race rather than a genuine duplicate.
What this error means
Install fails with "EEXIST: file already exists, symlink" naming a path in node_modules/.bin. Retrying succeeds, indicating two installs touched the same tree at once.
npm error code EEXIST
npm error syscall symlink
npm error path /work/repo/node_modules/.bin/tsc
npm error EEXIST: file already exists, symlink '../typescript/bin/tsc'Common causes
Two installs racing on one tree
Parallel installs (matrix jobs or a re-entrant postinstall) both try to create the same .bin symlink.
A leftover symlink from an interrupted install
A killed install left a dangling symlink that the next install cannot recreate.
How to fix it
Use a clean tree and a single installer
Remove node_modules and run exactly one install to recreate the symlinks.
rm -rf node_modules
npm ciIsolate parallel job workspaces
Give each concurrent job its own checkout so symlink creation never overlaps.
- Avoid sharing node_modules across parallel jobs.
- Key caches per job to prevent simultaneous writes.
- Clean .bin before reinstalling if a job was interrupted.
How to prevent it
- Never run two installs against one node_modules concurrently.
- Reinstall from a clean tree with npm ci.
- Latchkey self-healing managed runners auto-retry transient EEXIST symlink races and isolate workspaces per job so concurrent installs do not collide.