pnpm / only-allow

Force a specific package manager to be used on a project
MIT License
578 stars 29 forks source link

Text file busy when running on AWS Amplify #30

Open lanesawyer opened 3 months ago

lanesawyer commented 3 months ago

So I'm not sure if this is an Amplify issue or only-allow problem, so you might tell me to go elsewhere!

We are using only-allow for an internal package we maintain. In the consuming repository (so not the actual repository where only-allow is used), the build sometimes fails on AWS Amplify because only-allow is running into a text file busy problem. This happens maybe once every 6 or 7 builds.

The error output:

npm ERR! command failed
npm ERR! command sh -c npx only-allow pnpm
npm ERR! npm WARN exec The following package was not found and will be installed: only-allow@1.2.1
npm ERR! sh: line 1: /root/.npm/_npx/0b83cd9ca5e1325c/node_modules/.bin/only-allow: Text file busy

The annoying part is that we don't care about using only-allow at all when consuming the package, but I can't figure out how to run off the preinstall for consumers of the package that has only-allow in it, so if there is any guidance there (did I overlook it in the docs?), that would also solve my problem.

anton-brass commented 1 month ago

same problem here with asyncapi/validation on nodejs 20.11.1

wanting to use asyncapi-validation: https://github.com/Elhebert/asyncapi-validation/blob/main/package.json

I'm skipping scripts now with,

npm ci --ignore-scripts