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
lerna bootstrap failing as a postinstall step with yarn workspaces #1308
Comments
Should we throw an error when people try |
Yes, that would be a big improvement. It would also be good to add something to the readme along with the bits on setting up yarn workspaces. |
I just tried it but it doesn't look like it resolves sibling packages. This is evident when you do testing for example. |
So after a bit more experimenting and searching other issues, I had to run the prepublish and prepare scripts of each package... |
That sounds like a yarn workspaces problem, then. Lerna is literally doing nothing special when you run bootstrap with workspaces enabled. |
@evocateur I think there is a difference of opinion there. From the yarn blog itself:
Based on this, I believe https://github.com/lerna/lerna/blob/master/commands/bootstrap/index.js#L90 should also execute https://github.com/lerna/lerna/blob/master/commands/bootstrap/index.js#L95-L104 |
Literally no context, example, etc etc etc. What "it" were you referring to?
#899 (written by one of the yarn maintainers) disagrees with you. Bootstrap has nothing at all to do with publishing. Lifecycles like If |
Thanks for the response and I am sorry I was a bit vague with my first comment. "it' being using workspaces as directed by the blog post and lerna. After a bit of digging on the yarn issues side, it at least is an issue on their end that is tracked as well: yarnpkg/yarn#3911 For now, the work around as mentioned is to use Hopefully your comments and mine here for now will help with others who approach this as well. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
not needed. For more info check: lerna/lerna#1308
Closing as a duplicate of #1125 |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Expected Behavior
I want to put "lerna bootstrap" in the "postinstall" script so that people who don't realise that lerna has a boostrap step can just run "yarn" and have everything set up for them.
Current Behavior
It hangs for ever on "lerna bootstrap". If I remove the "postinstall" step and run
yarn
andlerna bootstrap
as separate steps, they each complete in a couple of seconds.Steps to Reproduce (for bugs)
package.json
yarn
lerna.json
lerna-debug.log
package.json
Context
People have to know to run
yarn bootstrap
after installing.Your Environment
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: