React Native构建在终端中失败,但在Xcode中可以正常运行

时间:2019-05-04 12:18:14

标签: react-native

当我尝试在终端中运行我的react-native版本时,出现此错误:

    clang-4.0: error: no such file or directory: '/Users/myname/project-x/ios/build/ProjectX/Index/DataStore'

     error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ProjectX.xcworkspace

构建命令信息失败:

    The following build commands failed:
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum-dtoa.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

(4个失败)

这正在为我团队中的另一个人工作。一切都可以在Xcode中构建并正常运行。

有时我会在运行create-react-app时遇到问题,因为我使用了anaconda python安装程序,因此我必须“杀死主机”,但这不能解决此问题

1 个答案:

答案 0 :(得分:0)

转到您的AppDelegate.m文件并更改jsCodeLocation。