Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky installs when installing via yarn #290

Closed
bienzaaron opened this issue Jun 4, 2024 · 2 comments
Closed

Flaky installs when installing via yarn #290

bienzaaron opened this issue Jun 4, 2024 · 2 comments
Labels

Comments

@bienzaaron
Copy link

bienzaaron commented Jun 4, 2024

I'm seeing occasional installation failures for this package when installing via yarn 4, which is making my CI very flaky. It'll report errors like:

13:54:26  ➤ YN0000: │ @tusbar/cache-control@npm:1.0.1 STDERR npm WARN exec The following package was not found and will be installed: only-allow@1.2.1
13:54:26  ➤ YN0000: │ @tusbar/cache-control@npm:1.0.1 STDERR npm WARN exec The following package was not found and will be installed: only-allow@1.2.1
13:54:26  ➤ YN0000: │ @tusbar/cache-control@npm:1.0.1 STDERR sh: 1: only-allow: not found
13:54:26  ➤ YN0009: │ @tusbar/cache-control@npm:1.0.1 couldn't be built successfully (exit code 127, logs can be found here: /tmp/xfs-7e933b3f/build.log)

this is related to the preinstall script here:

"preinstall": "npx only-allow pnpm",

Some similar issues on different projects:
ethereum-optimism/optimism#9078
Sphereon-Opensource/PEX#157

This also could be related to some quirks in the way yarn 2+ run lifecycle scripts: https://yarnpkg.com/advanced/lifecycle-scripts#postinstall

Thoughts on removing this, or using corepack + the packageManager field to encourage contributors to use the correct package manager? Happy to send a PR if either are acceptable.

@bienzaaron
Copy link
Author

Alternatively, a git precommit hook + running the only-allow script on a different script in this package's CI would also do the trick without the script running for consumers of this package.

@tusbar tusbar closed this as completed in 23335b0 Jun 12, 2024
@tusbar
Copy link
Owner

tusbar commented Jun 12, 2024

🎉 This issue has been resolved in version 1.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants