-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Xcode build error for react-native AwesomeProject #4034
Comments
This issue should be fixed in 0.14.2. Please try upgrading and close this issue if it's fixed for you. |
@ide thanks, fix it 👍 |
Hi, I'm still getting this error. Just installed fresh today, package.json specifies 0.14.2. ../node_modules/react-native/packager/react-native-xcode.sh: line 45: react-native: command not found
Command /bin/sh failed with exit code 127 react-native-cli is also installed globally. $ react-native -v #0.1.7 Any ideas? |
If I add this to the shell file right above the call to react-native it builds: PATH=${PATH}:/Users/aramz/.node/bin $ which react-native #/Users/aramz/.node/bin//react-native So my path is somehow messed up. |
@ide I am trying to start a new project and get the following error
|
previously I use nvm to manage node version, and this issue point that Xcode path can't find nvm path correctly, you could try my method below .. open your
maybe current stable node version is v5.0.0, when you finished above try, re-run your Xcode. hope make sense. |
react-native-xcode.sh will source nvm.sh for you in RN 0.14.2. Perhaps you need to run |
I'm not seeing a EDIT: I also used homebrew to install it. |
I am confirming my second edit in my last comment. I uninstalled nvm from homebrew and installed it using the recommended curl method. Now it compiles. |
Had this issue, now resolved. It was a result of using prefix option (for installed packages) in npm configuration, which in turn was breaking nvm, which hosed the script. |
I ran into this issue and I'm not running nvm:
The
As a workaround I added this right above the call to
|
Summary: Related to issue #4034 (comment). The npm global install path may be set to a non-standard location. `react-native` is assumed to be in `PATH` but doesn't take into account the user's environment so building in Xcode fails: ~~~ react-native bundle --entry-file index.ios.js --platform ios --dev true --bundle-output [...] ../node_modules/react-native/packager/react-native-xcode.sh: line 48: react-native: command not found Command /bin/sh failed with exit code 127 ~~~ This fix uses `npm prefix -g` to get the bin location and adds it to `PATH`. Closes #4749 Reviewed By: svcscm Differential Revision: D2753215 Pulled By: androidtrunkagent fb-gh-sync-id: 964d1a71ac1bf204545a594a9fa433a7bc367f35
Summary: Related to issue facebook/react-native#4034 (comment). The npm global install path may be set to a non-standard location. `react-native` is assumed to be in `PATH` but doesn't take into account the user's environment so building in Xcode fails: ~~~ react-native bundle --entry-file index.ios.js --platform ios --dev true --bundle-output [...] ../node_modules/react-native/packager/react-native-xcode.sh: line 48: react-native: command not found Command /bin/sh failed with exit code 127 ~~~ This fix uses `npm prefix -g` to get the bin location and adds it to `PATH`. Closes facebook/react-native#4749 Reviewed By: svcscm Differential Revision: D2753215 Pulled By: androidtrunkagent fb-gh-sync-id: 964d1a71ac1bf204545a594a9fa433a7bc367f35
I follow step but receive below output from Xcode 😢
could anybody rescue me? thx ..
The text was updated successfully, but these errors were encountered: