React-native - 由于双重转换,构建失败 [英] React-native - Build failed due to double-conversion

查看:452
本文介绍了React-native - 由于双重转换,构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过终端创建了新的react-native项目。

I have created new react-native project through terminal.

react-native init PlayWithAnimation  

当我通过Xcode运行react-native应用程序时。我收到了这个错误。

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


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

/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:没有这样的文件或目录

/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:没有这样的文件或目录

/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

/ U sers / 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:无法执行:没有这样的文件或目录

/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

以下构建命令失败:

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

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次失败)

这些是我使用的版本:

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

我已检查过与其他stackoverflow Q&但是没有得到适当的解决方案。

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

临时解决方案:

如果我创建react-native,它会顺利运行版本= 0.44.0。但是在版本0.45.0中,0.46.0,0.47.0 版本失败,同样的双转换问题也随之而来。还有一件事,当我创建新项目时,第三方目录丢失了。

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)

会出现什么问题?

尝试解决方案1:

我执行了以下步骤:


  1. 下载.sh中所需的文件,将其放入〜/ .rncache /.

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

将下载的文件复制到node_modules / react-native / third-party /,对每个文件运行tar -zxf ***。

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

再建一次。但没有奏效。

build again. But not worked.

尝试解决方案2:

处理第三方在反应原生0.46x上构建错误。
并尝试使用 github 问题。

我真的很高兴终于开始使用React Native,但是这个bug绝对会让我无法继续。如果有人可以帮我解决这个问题,我真的很感激。

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.

推荐答案

Got来自杰瑞汉的解决方案救生员


嗨巴拉,你可以看到错误日志,该错误来自工作路径上的'WhiteSpace'



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’.

这对你有帮助。

通过开发或操作工作,最好不要在路径上使用空格。

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

这篇关于React-native - 由于双重转换,构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆