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

Command /bin/sh failed with exit code 8 #3983

Closed
nidzovito opened this issue Nov 8, 2015 · 11 comments
Closed

Command /bin/sh failed with exit code 8 #3983

nidzovito opened this issue Nov 8, 2015 · 11 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@nidzovito
Copy link

I am following this tutorial
https://facebook.github.io/react-native/docs/getting-started.html#content
And it worked fine but now I have this error when I retried.

  • DEST=/Users/User/Library/Developer/Xcode/DerivedData/AwesomeProject-abayzwfqcshpereqmyhwxuvxnzeo/Build/Products/Debug-iphonesimulator/AwesomeProject.app
  • react-native bundle --entry-file index.ios.js --platform ios --dev true --bundle-output /Users/User/Library/Developer/Xcode/DerivedData/AwesomeProject-abayzwfqcshpereqmyhwxuvxnzeo/Build/Products/Debug-iphonesimulator/AwesomeProject.app/main.jsbundle --assets-dest /Users/User/Library/Developer/Xcode/DerivedData/AwesomeProject-abayzwfqcshpereqmyhwxuvxnzeo/Build/Products/Debug-iphonesimulator/AwesomeProject.app

/Users/User/Documents/Project/Test/AwesomeProject/node_modules/react-native/local-cli/cli.js:56
const setupEnvScript = /^win/.test(process.platform)
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Module._extensions..js (module.js:474:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/User/Documents/Project/Test/AwesomeProject/node_modules/react-native/cli.js:15:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
Command /bin/sh failed with exit code 8

My node version is 5.0.0.
I installed nvm also
nvm ls
v4.2.1
-> v5.0.0
system
default -> node (-> v5.0.0)
node -> stable (-> v5.0.0) (default)
stable -> 5.0 (-> v5.0.0) (default)
iojs -> N/A (default)

Any idea please help.

@basicBrogrammer
Copy link

👍

@ilarip
Copy link

ilarip commented Nov 8, 2015

I started playing with React Native and found out the same problem. Xcode $PATH is different from the one in your user shell. I included nvm to the loop by adding source ~/.bash_profile to ../myproject/node_modules/react-native/packager/react-native-xcode.sh and it fixed the problem. You can also play with your project's settings in Xcode to fix this.

@nidzovito
Copy link
Author

Yay!!!
It worked with packager/react-native-xcode.sh file.
Thanks.
can you let me know which menu link of Xcode should I follow in case of using Xcode project's settings?

@TheSavior
Copy link
Member

I had this problem as well and moifying the shell file fixed it. Since the getting started recommends nvm aliasing 4+ to default, it seems like react-native should be assuming nvm.

@basicBrogrammer
Copy link

That's a good work around, but I was hoping for a little more out of react native. Then, I realized there are 700+ issues. This does not seem like a great framework. Is this because react-native is in beta or something ?

@sHarenZzz
Copy link

@ilarip I try to doing something follow ur said.but it's not useful.ur means adding "source ~/.bash_profile" to react-native-xcode.sh? my english is pool. :) please help.

@gre
Copy link
Contributor

gre commented Nov 9, 2015

dup #3948

@christopherdro
Copy link
Contributor

@georgi-kovachev Try using 0.14.2.

@christopherdro
Copy link
Contributor

@georgi-kovachev Any progress?

@nidzovito
Copy link
Author

I was able to make it working using packager/react-native-xcode.sh file which @ilarip commented 12 days ago.
But I couldn't find the settings in xcode

@christopherdro
Copy link
Contributor

Glad to hear you got it working. Could you please close out the issue? Thanks!

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

No branches or pull requests

8 participants