-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
This is in response to @chirag04's comment here #3545 (comment)
There are two possibilities here:
- you don't have
react-native-cliinstalled; in that case, donpm install -g react-native-cliand all should be well - Xcode doesn't have the
react-nativecommand on its path when running the script, probably because yournodeinstallation isn't global. For me, since I have node installed vianvm, I just changed the "Run Script" Xcode entry to be

The. ~/.nvm/nvm.shline is an easy way to get my node installation on the PATH.
Another way to do it is type which react-native in your normal terminal, and you'll get something like:
/Users/jared/.nvm/versions/node/v5.0.0/bin/react-native
Then take the parent directory of that executable, (/Users/jared/.nvm/versions/node/v5.0.0/bin/ in this case) and then change that script to be

And now the actual question
Given that the script doesn't always work out of the box, could the react-native init/upgrade script be modified to figure out its own directory, and then add the export PATH=$PATH:/path/to/my/directory line to the Xcode script automatically?
cc @frantic
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.