The Wayback Machine - https://web.archive.org/web/20260217143842/https://github.com/microsoft/rushstack/issues/3152
Skip to content

[rush] rush link fails if package has a bin entry that is generated and doesn't exist until after build  #3152

@MichaelBelousov

Description

@MichaelBelousov

Summary

Trying to rush install a repo that I added a new package to with a bin entry that points to a javascript file that is
generated after a typescript build causes rush link to fail on windows. It doesn't seem to have this issue on my ubuntu machine.

Repro steps

  1. Open some package in any existing rush-using repo
  2. in the package, add a bin entry like "bin": "lib/index.js", which is an example generated output from some src/index.ts in a typescript project
  3. try to rush link or rush install your project

I will craft a minimal reproduction repo soon, I just wanted to put this up before I forget.

Details

Weirdly, it worked on my linux machine, but not my windows machine. This makes me think however rush creates links on
windows refuses to create broken links to non-existing targets, but on linux it'll happily make a broken link. The link of course
will be fixed after the build generating the missing file succeeds. This is my guess, I haven't inspected the link yet

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.54.0
rushVersion from rush.json? 5.54.0
useWorkspaces from rush.json? no
Operating system? Windows (works on linux apparently)
Would you consider contributing a PR? no, wish I could but I don't have time right now
Node.js version (node -v)? 14.18.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Waiting for Author

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions