Skip to content

Only set bins on pack #127

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

Merged
merged 1 commit into from
Jun 13, 2022
Merged

Only set bins on pack #127

merged 1 commit into from
Jun 13, 2022

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Jun 13, 2022

The package.json contains a bin entry point to dist/yarn.js. As a result, when a script runs, this bin entry is injected into the PATH. While it usually works fine, in this case the bin is called yarn, so it overrides the yarn binary usually present in the PATH and that prepack calls to run yarn build. Given that dist/yarn.js doesn't exist yet at this point in time, the packing fails.

This diff fixes that by only setting the bin entries inside the published package, so that they don't override the local values during development.

@arcanis arcanis merged commit 7ae489a into main Jun 13, 2022
@arcanis arcanis deleted the mael/fix-bin-publish branch June 13, 2022 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant