berry
berry copied to clipboard
[Bug]: scripts fail with Linux 6.9.0-6.9.2: ETXTBSY
Self-service
- [X] I'd be willing to implement a fix
Describe the bug
The package es5-ext
can't be install using Yarn:
The reason is that it contains a postinstall
script that fails with the following error:
# This file contains the result of Yarn building a package (es5-ext@npm:0.10.64)
# Script name: postinstall
Error: spawn ETXTBSY
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:760:9)
at JY (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:9:52616)
at LE.implementation (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:159:1348)
at LE.exec (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:165:1414)
at LE.run (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:165:1585)
at oce (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:165:7428)
at async Eot (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:167:16)
at async u (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:167:147)
at async Cot (/data/projects/eternal-twin/popotamo/.yarn/releases/yarn-4.2.2.cjs:168:14)
To reproduce
await packageJsonAndInstall({
dependencies: {
[`es5-ext`]: `0.10.64`,
},
});
Environment
System:
OS: Linux 6.9 Arch Linux
CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
Binaries:
Node: 22.2.0 - /usr/bin/node
Yarn: 4.2.2 - /usr/bin/yarn
npm: N/A
Additional context
This also fails with Yarn 1.22.22 when running it inside the es5-next
repo.
git clone https://github.com/medikoo/es5-ext.git
cd es5-next
yarn run postinstall
The error is:
yarn run v1.22.22
$ node -e "try{require('./_postinstall')}catch(e){}" || exit 0
/bin/sh: /tmp/yarn--1716498028617-0.6802456915004955/node: /bin/sh: bad interpreter: Text file busy
Done in 0.12s.
The value for the postinstall script is " node -e \"try{require('./_postinstall')}catch(e){}\" || exit 0"
(with a leading space, removing it does not fix the issue).
EDIT: I downloaded npm 10.8.0 since then, running the postinstall script through npm
works.