Skip to content

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

@Guria

Description

@Guria

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions