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

bit link doesn't generate all custom resolved modules links #2033

Closed
davidfirst opened this issue Sep 26, 2019 · 2 comments
Closed

bit link doesn't generate all custom resolved modules links #2033

davidfirst opened this issue Sep 26, 2019 · 2 comments
Assignees
Labels

Comments

@davidfirst
Copy link
Member

Describe the bug

bit link generates the missing links of custom-module-resolution.
For example, if an alias was set from src to @foo, bit link creates node_modules/@foo file that links to the 'src' in the imported component.
The issue happens when the following criteria are met:

  1. the alias has more than two slashes. e.g. @/foo/bar.
  2. a component file refers to multiple aliases with the same prefix.

In case the first link exists but not the second, bit status shows as if the first link is missing.
When running bit link it's able to generate the missing link.

Steps to Reproduce

  1. create two aliases: src/bar/foo => @/bar/foo, src/bar/baz => @/bar/baz
  2. create a component that require the above two. tag, commit and export.
  3. import the component above, manually delete the link of @/bar/baz.
    run 'bit status' and 'bit link' to see the issues above.

Specifications

  • Bit version: 14.4.0
  • Bit compiler (include version): N/A
  • Bit tester (include version): N/A

Additional context

The issue was found by @zeesulehria and reported via Gitter.

@davidfirst
Copy link
Member Author

The commits above fix the bit link part to link all the missing links.
The failure to recognize the correct missing links is still due.

@itaymendel
Copy link
Contributor

irrelevant with v15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants