Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native - Build failed due to double-conversion

I have created new react-native project through terminal.

react-native init PlayWithAnimation  

when I run the react-native app through Xcode. I got this error.

enter image description here

/bin/sh -c \"/Users/sumit/Desktop/React\ Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh\"

/Users/sumit/Desktop/React >Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 2: cd: /Users/sumit/Desktop/React: No such file or directory

/Users/sumit/Desktop/React >Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 3: /Users/sumit/Desktop/React Native/RNN/node_modules/react-native/React/scripts/ios-install-third-party.sh: No such file or directory

/Users/sumit/Desktop/React Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh: line 3: exec: /Users/sumit/Desktop/React Native/RNN/node_modules/react-native/React/scripts/ios-install-third-party.sh: cannot execute: No such file or directory

The following build commands failed:

PhaseScriptExecution Install\ Third\ Party /Users/sumit/Desktop/React\ Native/RNN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh

(1 failure)

These are the version which I have used:

node v8.0.0
npm 5.0.3
react-native-cli: 2.0.1
react-native: 0.46.0
xcode 8.3.3

I have checked related to other stackoverflow Q & A but did't get proper solution.

Temporary Solution:

It works smoothly if I create react-native with version="0.44.0". But in version 0.45.0, 0.46.0, 0.47.0 builds are failed and same "double-conversion" issue is getting. And one more thing, when I create new project third-party directory is missing.

node_modules/react-native/ (missing third-party directory)

What would be the problem ?

Tried Solution 1:

I did the following steps:

  1. download the files needed inside the .sh, put it in the ~/.rncache/.

  2. copy the downloaded files into node_modules/react-native/third-party/, ran tar -zxf *** to each file.

  3. build again. But not worked.

Tried Solution 2:

Handling third party build error on react-native 0.46x. and tried with github issue.

I was really excited to finally get started with React Native but this bug absolutely kills my ability to proceed. I'd really appreciate if someone could help me out with this.

like image 731
Balasubramanian Avatar asked Jul 22 '17 08:07

Balasubramanian


1 Answers

Got the solution from jerry han here: The life saver

Hi Bala, As you can see the error log, That error was from ‘WhiteSpace’ on your working path.

Real Path : /Users/sumit/Desktop/React\ Native/
On cd cmd log : /Users/sumit/Desktop/React:
You should rename your working path to ‘/Users/sumit/Desktop/react_native’.

That will be helpful for you.

With developing or operation work, you may be better not to use ‘space’ on the path.

like image 185
Balasubramanian Avatar answered Nov 10 '22 10:11

Balasubramanian