Skip to content

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