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

"react-native link @scope/package-name" links all packages #18766

Closed
3 tasks done
henninghall opened this issue Apr 9, 2018 · 1 comment
Closed
3 tasks done

"react-native link @scope/package-name" links all packages #18766

henninghall opened this issue Apr 9, 2018 · 1 comment
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@henninghall
Copy link

react-native link [package-name] is searching whole node_modules for native modules (and linking them) when trying to link a specific scoped package.

Environment

Environment:
OS: macOS High Sierra 10.13.2
Node: 9.5.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.1 => 0.55.1

Steps to Reproduce

install any scoped npm package with npm install or yarn add, for instance:

yarn add @henninghall/react-native-date-picker

run:

react-native link @henninghall/react-native-date-picker

Expected Behavior

I expect only the specified package folder to be searched and linked. I expect the same behaviour as react-native link non-scoped-package

Actual Behavior

All folders in node_modules are search and linked as when running react-native link

@stale
Copy link

stale bot commented Jul 8, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 8, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Aug 7, 2018
kelset pushed a commit that referenced this issue Aug 13, 2018
Summary:
Currently, when the cli tries to determine the package name, it accidentally trims out the entire package name.  This makes it appear to the rest of the program as if `react-native link The controller you requested could not be found./my-package` was just `react-native link`.  This adds a little regex to prevent that from happening, so that scopes can be passed as parts of packages.

Fixes #18766
Pull Request resolved: #19828

Differential Revision: D8704742

Pulled By: hramos

fbshipit-source-id: d8183f9b55e8656b8a0acae842e1361a1f428102
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants