Closed
Description
This is the exact same issue as #1184.
When using nodeLinker: node-modules, during the link step, yarn will attempt to delete the entire node_modules directory, instead of only its contents. This causes problems with the common docker pattern of mounting node_modules as a volume, resulting in an error like the following:
➤ YN0000: ┌ Link step
➤ YN0001: │ Error: EBUSY: resource busy or locked, rmdir '/work/node_modules'
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 0s 98ms
To reproduce
git clone [email protected]:ncjones/yarn-nm-volume.git
cd yarn-nm-volume
docker compose run script yarn install
Environment
System:
OS: macOS