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

Use symlinks with relative paths instead of absolute on non-windows environments #423

Closed
JaapRood opened this issue Dec 5, 2016 · 4 comments

Comments

@JaapRood
Copy link

JaapRood commented Dec 5, 2016

It seems that with the great effort to make symlinks work on win32 portability of a lerna repo has been reduced, as the use of "junction" to create a symlink requires the use an absolute destination path. What this means is that after running lerna bootstrap and then moving the project folder, all symlinks are invalid and no longer point to an existing directory.

Why care? When deploying a repo that uses Lerna to Heroku the app gets built in a temporary folder, to then be copied over to it's runtime destination. You can run lerna bootstrap before booting your server, however, this also means any other prepublish hooks will be triggered, causing much of the app to build again (as that's the main means of building node apps before they are deployed on Heroku).

@JaapRood JaapRood changed the title Use symlinks with relative paths instead of absolute on non windows environments Use symlinks with relative paths instead of absolute on non-windows environments Dec 5, 2016
@gigabo
Copy link
Contributor

gigabo commented Dec 12, 2016

Hmm... thanks for reporting this @JaapRood.

So, it sounds like:

  1. Windows requires an absolute destination (for junctions)
  2. Lerna is therefore always using an absolute destination
  3. This breaks heroku, which builds and then moves into place

Is that right? Would a solution here be to only convert to absolute destinations on windows? That would leave build/move broken on Windows, but it would at least allow build to work on windows and also allow build/move to work in other environments.

@gigabo gigabo added the bug label Dec 12, 2016
@gigabo
Copy link
Contributor

gigabo commented Dec 12, 2016

Oh, I see that's exactly what you've suggested in the issue title. 😆

That sounds great. @JaapRood Are you interested in taking this on?

@JaapRood
Copy link
Author

@gigabo that's exactly right. I don't have access to a windows machine with development environment, so I'll need help on that front, but I'll give it a go and see how far I get.

@lock
Copy link

lock bot commented Dec 28, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants