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

--link doesn't work well on windows #66

Open
Guria opened this issue Jul 16, 2018 · 2 comments
Open

--link doesn't work well on windows #66

Guria opened this issue Jul 16, 2018 · 2 comments

Comments

@Guria
Copy link
Member

Guria commented Jul 16, 2018

Windows system tries to resolve actual js to run relatively to junction point instead of original location while trying to run cmd from linked binaries folder.

> [email protected] clean C:\ws\cerebral\overmind\packages\node_modules\overmind
> rimraf dist es lib coverage


module.js:549
    throw err;
    ^

Error: Cannot find module 'C:\ws\cerebral\overmind\packages\node_modules\overmind\node_modules\rimraf\bin.js'

It just junctions is not the same as symlinks

We can work with scripts through repo-cooker without linking at all. just add %monorepoRoot%/node_modules/.bin into PATH in runtime
But it wouldn't be possible to run scripts in subfolders directly.

As I remember I did a special trick in cerebral monorepo for the same problem.

First I did this trick:
https://github.com/cerebral/cerebral/blob/4647f3dbea899fa4bcc57370aaba82c2538a3b86/package.json#L20

then it was replaced with link-parent-bin
cerebral/cerebral@b31a93c#diff-b9cfc7f2cdf78a7f4b91a753d10865a2(edited)
details here:
cerebral/cerebral#870

@Guria
Copy link
Member Author

Guria commented Jul 17, 2018

unfortunately, link-parent-bin accepts only one childDirectoryRoot and can't deal with list of packages

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

No branches or pull requests

1 participant