React-native - Build failed due to double-conversi

2020-07-09 01:55发布

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.

2条回答
姐就是有狂的资本
2楼-- · 2020-07-09 02:39

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.

查看更多
3楼-- · 2020-07-09 02:47

For me, what worked was just updating the Code Signing preference in Xcode to something different and back again.

E.g. I have Automatically manage signing originally turned on. Turning that off and back on again seems to resolve this issue.

查看更多
登录 后发表回答