react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Command /bin/sh failed with exit code 1

Open hojberg opened this issue 11 years ago • 18 comments

After upgrading to React Native 0.14 I get this when trying to build. (node 5.0.0; npm 3.3.6)

const setupEnvScript = /^win/.test(process.platform)
  ^^^^^
Command `bundle` unrecognized. Did you mean to run this inside a react-native project?
Command /bin/sh failed with exit code 1

hojberg avatar Nov 09 '15 16:11 hojberg

Related #3948

christopherdro avatar Nov 09 '15 16:11 christopherdro

https://github.com/facebook/react-native/issues/3948 deals with exit code 127. In that thread @samsalisbury solves the exit code 1 problem with updating his babelrc. However I do not have that specific feature whitelisted and i'm on Node 5, not 4.

hojberg avatar Nov 09 '15 17:11 hojberg

@hojberg I understand that the error codes might be different but I just wanted to make reference that all of these issues might be related to the addition of https://github.com/facebook/react-native/blob/master/packager/react-native-xcode.sh

That's why i wrote related and not duplicate :)

christopherdro avatar Nov 09 '15 17:11 christopherdro

@christopherdro ah that makes sense; reasonable :)

hojberg avatar Nov 09 '15 18:11 hojberg

Fixed by RN 0.14.2

hojberg avatar Nov 10 '15 09:11 hojberg

I had a RN 0.13.2 project which was working fine on Xcode 6. Now after upgrading 0.16.0-rc and Xcode 7.1 I'm getting Command /bin/sh failed with exit code 1 on building. My node version is 4.2.1 and npm is 3.4.0. The solution at #3948 doesn't seem to work for me either. Any help regarding this?

sankhadeeproy007 avatar Dec 02 '15 08:12 sankhadeeproy007

@sankhadeeproy007 I'm suddenly having this problem on RN 0.17. Did you ever learn how to resolve the error yourself?

marclundgren avatar Jan 18 '16 18:01 marclundgren

+1

rainer-liao avatar Jan 20 '16 03:01 rainer-liao

@marclundgren I try Target -> Build-Phases -> Bundle React Native code and Images check Run script only when installing.

rainer-liao avatar Jan 20 '16 03:01 rainer-liao

I had this same issues and spent a few hours trying to get it fixed. @rainer-liao thank you!

M-Jas avatar Jan 24 '16 18:01 M-Jas

@rainer-liao Thank you!!

JuniorJser avatar Jan 26 '16 03:01 JuniorJser

@rainer-liao thank you! +1 works like a charm

varqasim avatar Jan 29 '16 20:01 varqasim

@rainer-liao Thanks for this solution....really helpful

rock1002 avatar Feb 15 '16 02:02 rock1002

@rainer-liao thank you so much !!!!

ghost avatar Feb 20 '16 14:02 ghost

thanks @rainer-liao!

tomazjejcic avatar Jun 02 '16 06:06 tomazjejcic

@rainer-liao you saved the day - thanks! Any idea why/how this problem seems to appear out of nowhere?

TheoGit avatar Aug 30 '16 18:08 TheoGit

Thank You so much for your suggestion! It worked... You are a STAR !!! @rainer-liao

SumaiyaKhan avatar Feb 15 '17 04:02 SumaiyaKhan

Thank you so much!

Ulanxx avatar Sep 14 '17 08:09 Ulanxx