--link doesn't work well on windows
Guria opened this issue · comments
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.
> overmind@1.0.0-alpha1 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
unfortunately, link-parent-bin accepts only one childDirectoryRoot and can't deal with list of packages