码迷,mamicode.com
首页 > 其他好文 > 详细

编译依赖于React Native0.46.4的工程,报错“react-native-xcode.sh now lives in a different location”

时间:2017-08-01 14:30:32      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:bre   2.3   com   diff   where   ase   ror   this   stack   

我的环境:

WebStorm 2017.2
Build #WS-172.3317.70, built on July 14, 2017

JRE: 1.8.0_152-release-915-b5 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Mac OS X 10.12.6

Xcode8.3.3(8E3004b)

RN在Github上有比较明确的解决方案,但是对于Xcod不是十分熟悉,没有一步一步明确的指导,最终在stackoverflow上找到可以解决我的问题的帖子。

选自:https://stackoverflow.com/questions/33650380/react-native-error-react-native-xcode-sh-line-45-react-native-command-not-found

 

If you are using RN 0.46 or above:

There is a breaking change made by Facebook: the location of the script has been changed, more detail here

I was able to solve this error by:

  • Opening the project in XCode
  • Navigate to Build Phases > Bundle React Native code and images
  • Change export NODE_BINARY=node ../node_modules/react-native/packager/react-native-xcode.sh to export NODE_BINARY=node ../node_modules/react-native/scripts/react-native-xcode.sh

Notice how packager is now scripts, which is where that file actually lives in latest version of RN

技术分享

编译依赖于React Native0.46.4的工程,报错“react-native-xcode.sh now lives in a different location”

标签:bre   2.3   com   diff   where   ase   ror   this   stack   

原文地址:http://www.cnblogs.com/yangruishan/p/7262902.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!