ptmt / react-native-macos

[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.25k stars 429 forks source link

Build failed: Print: Entry, ":CFBundleIdentifier", Does Not Exist #242

Closed brunolemos closed 5 years ago

brunolemos commented 5 years ago

🐛 Bug Report

Trying to init a new project, getting build failed error.

I see there's #199, #174 and possibly others, but didn't find any fix in the comments that'd fix it for me.

WriteAuxiliaryFile /Users/brunolemos/Projects/del/macos/macos/build/Build/Intermediates.noindex/React.build/Debug/double-conversion.build/Objects-normal/x86_64/double-conversion.LinkFileList (in target: double-conversion)
    cd /Users/brunolemos/Projects/del/macos/node_modules/react-native-macos/React
    write-file /Users/brunolemos/Projects/del/macos/macos/build/Build/Intermediates.noindex/React.build/Debug/double-conversion.build/Objects-normal/x86_64/double-conversion.LinkFileList

** BUILD FAILED **

The following commands produced analyzer issues:
    Analyze /Users/brunolemos/Projects/del/macos/node_modules/react-native-macos/ReactCommon/yoga/yoga/Yoga.cpp normal x86_64
(1 command with analyzer issues)

The following build commands failed:
    CompileC /Users/brunolemos/Projects/del/macos/macos/build/Build/Intermediates.noindex/React.build/Debug/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/brunolemos/Projects/del/macos/node_modules/react-native-macos/third-party/double-conversion-1.1.5/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/brunolemos/Projects/del/macos/macos/build/Build/Intermediates.noindex/React.build/Debug/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/brunolemos/Projects/del/macos/node_modules/react-native-macos/third-party/double-conversion-1.1.5/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    CompileC /Users/brunolemos/Projects/del/macos/macos/build/Build/Intermediates.noindex/React.build/Debug/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/brunolemos/Projects/del/macos/node_modules/react-native-macos/third-party/double-conversion-1.1.5/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
Launching build/Build/Products/Debug/macos.app
The application cannot be opened because it has an incorrect executable format.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug/macos.app/Contents/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

To Reproduce

Steps to reproduce the behavior:

Expected Behavior

Run project.

Environment

jardenliu commented 5 years ago

@brunolemos Workaround Steps as follow: 1) Close your Xcode. 2) Open Terminal, go to your project's root folder and exec:

   cd node_modules/react-native/third-party/glog-{X}.{X}.{X}/

3) Run the configure script:

./configure
brunolemos commented 5 years ago

That does fix this build error, thanks! :)

cd node_modules/react-native-macos/third-party/glog-0.3.4/
./configure

But we shouldn't need to do this, something need to be fixed.