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

--projectDir is not supported any more #25628

Closed
taoqf opened this issue Jul 13, 2019 · 1 comment
Closed

--projectDir is not supported any more #25628

taoqf opened this issue Jul 13, 2019 · 1 comment
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@taoqf
Copy link

taoqf commented Jul 13, 2019

When upgrade to 0.60, I got this error when I run react-native link:

error: unknown option `--projectRoot'

React Native version:

0.60.0 0.60.1 0.60.2 0.60.3

Steps To Reproduce

Just link any package with --projectRoot flag

react-native link --projectRoot ./ react-native-webview

Describe what you expected to happen:

I with --projectRoot flag back, it's useful to me.

Snack, code example, or link to a repository:

react-native link --projectRoot ./ react-native-webview
react-native link --projectRoot ./ react-native-webview
@taoqf taoqf added the Bug label Jul 13, 2019
@RobinCsl
Copy link

Hi @taoqf,

It seems that the behaviour for linking native dependencies has changed in RN 0.60. See the blog post announcing its release: https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked

Running react-native link --help yields the following:

react-native link [packageName]

links assets and optionally native modules

Options:
  --platforms [list]  Scope linking to specified platforms
  --all [boolean]     Link all native modules and assets
  -h, --help 

so it does look like option projectRoot was removed from the CLI.

I believe this is the relevant documentation you need: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

Hope that helps!

@taoqf taoqf closed this as completed Jul 15, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Oct 8, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants