mirror of https://github.com/status-im/metro.git
Dont call npm before node is available
Summary: This fixes an error introduced in `0.18.0-rc` `node` and `npm` isn't available if the developer is using `nvm` or `nodeenv`. XCode throws an error because of the call to `npm`. Simple move the line to after `node` and `npm` has been setup. Closes https://github.com/facebook/react-native/pull/5156 Reviewed By: svcscm Differential Revision: D2807589 Pulled By: androidtrunkagent fb-gh-sync-id: 30c33145b2cb6f30ff67f6648153d5aa67fb74ed
This commit is contained in:
parent
9e5dfbddbc
commit
85c016df31
|
@ -29,9 +29,6 @@ cd ..
|
||||||
set -x
|
set -x
|
||||||
DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH
|
DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH
|
||||||
|
|
||||||
# npm global install path may be a non-standard location
|
|
||||||
PATH="$(npm prefix -g)/bin:$PATH"
|
|
||||||
|
|
||||||
# Define NVM_DIR and source the nvm.sh setup script
|
# Define NVM_DIR and source the nvm.sh setup script
|
||||||
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
|
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
|
||||||
|
|
||||||
|
@ -46,6 +43,9 @@ if [[ -x "$HOME/.nodenv/bin/nodenv" ]]; then
|
||||||
eval "$($HOME/.nodenv/bin/nodenv init -)"
|
eval "$($HOME/.nodenv/bin/nodenv init -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# npm global install path may be a non-standard location
|
||||||
|
PATH="$(npm prefix -g)/bin:$PATH"
|
||||||
|
|
||||||
react-native bundle \
|
react-native bundle \
|
||||||
--entry-file index.ios.js \
|
--entry-file index.ios.js \
|
||||||
--platform ios \
|
--platform ios \
|
||||||
|
|
Loading…
Reference in New Issue