我決定重新開始一個新的react-native項目,所以我更新了我的react-client到最新的2.0,更新了cocoapods到最新版本,並且我剛剛初始化了一個空白react-native項目,yarn添加了一堆依賴關係,react-native鏈接沒有錯誤,然後嘗試運行並得到大量錯誤。我錯過了非常明顯的東西嗎?react-native run-ios只會產生一大堆錯誤 - 如何調試
步驟:
react-native init Foo && cd Foo
yarn add react-dom
yarn add react-apollo
yarn add @shoutem/ui
yarn add [email protected]^0.6.0
yarn add react-dom redux
yarn add react-redux
yarn add redux-thunk
yarn add bluebird
yarn add redux-actions
yarn add react-native-lock
yarn add redux-persist
react-native link
react-native run-ios
錯誤:如果你正在運行
=== BUILD TARGET RNVectorIcons OF PROJECT RNVectorIcons WITH CONFIGURATION Debug ===
Check dependencies
CompileC /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RNVectorIconsManager.o RNVectorIconsManager/RNVectorIconsManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/mycomputer/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-rc1-update1/bin:/Users/mycomputer/.dnx/bin:/usr/local/heroku/bin:/Applications/sdk/platform-tools:/Applications/sdk/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/mycomputer/Projects/Foo/ios/build/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/mycomputer/Projects/Foo/ios/build/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=7.0 -g -Wno-sign-conversion -Wno-infinite-recursion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/RNVectorIcons-generated-files.hmap -I/Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/RNVectorIcons-own-target-headers.hmap -I/Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/RNVectorIcons-all-target-headers.hmap -iquote /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/RNVectorIcons-project-headers.hmap -I/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/../../React -I../react-native/React -I../react-native/React/Base -I../react-native/React/CSSLayout -I../react-native/React/Executors -I../react-native/React/Modules -I../react-native/React/Profiler -I../react-native/React/Views -I/Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/node_modules/react-native/React -I/Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/DerivedSources/x86_64 -I/Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/DerivedSources -F/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator -MMD -MT dependencies -MF /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RNVectorIconsManager.d --serialize-diagnostics /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RNVectorIconsManager.dia -c /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m -o /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RNVectorIconsManager.o
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:40:28: error: redefinition of 'RCTLogLevel'
typedef NS_ENUM(NSInteger, RCTLogLevel) {
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:40:28: note: previous definition is here
typedef NS_ENUM(NSInteger, RCTLogLevel) {
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:41:3: error: redefinition of enumerator 'RCTLogLevelTrace'
RCTLogLevelTrace = 0,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:41:3: note: previous definition is here
RCTLogLevelTrace = 0,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:42:3: error: redefinition of enumerator 'RCTLogLevelInfo'
RCTLogLevelInfo = 1,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:42:3: note: previous definition is here
RCTLogLevelInfo = 1,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:43:3: error: redefinition of enumerator 'RCTLogLevelWarning'
RCTLogLevelWarning = 2,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:43:3: note: previous definition is here
RCTLogLevelWarning = 2,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:44:3: error: redefinition of enumerator 'RCTLogLevelError'
RCTLogLevelError = 3,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:44:3: note: previous definition is here
RCTLogLevelError = 3,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:45:3: error: redefinition of enumerator 'RCTLogLevelFatal'
RCTLogLevelFatal = 4
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:45:3: note: previous definition is here
RCTLogLevelFatal = 4
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:51:28: error: redefinition of 'RCTLogSource'
typedef NS_ENUM(NSInteger, RCTLogSource) {
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:51:28: note: previous definition is here
typedef NS_ENUM(NSInteger, RCTLogSource) {
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:52:3: error: redefinition of enumerator 'RCTLogSourceNative'
RCTLogSourceNative = 1,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:52:3: note: previous definition is here
RCTLogSourceNative = 1,
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:10:
In file included from ../react-native/React/Base/RCTConvert.h:17:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:53:3: error: redefinition of enumerator 'RCTLogSourceJavaScript'
RCTLogSourceJavaScript = 2
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:10:
../react-native/React/Base/RCTLog.h:53:3: note: previous definition is here
RCTLogSourceJavaScript = 2
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:11:
In file included from ../react-native/React/Base/RCTBridge.h:13:
/Users/mycomputer/Projects/Foo/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridgeModule.h:55:11: warning: duplicate protocol definition of 'RCTBridgeModule' is ignored
@protocol RCTBridgeModule <NSObject>
^
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:9:
In file included from /Users/mycomputer/Projects/Foo/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:9:
../react-native/React/Base/RCTBridgeModule.h:55:11: note: previous definition is here
@protocol RCTBridgeModule <NSObject>
^
1 warning and 9 errors generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/mycomputer/Projects/Foo/ios/build/Build/Intermediates/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RNVectorIconsManager.o RNVectorIconsManager/RNVectorIconsManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/Foo.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/Foo.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist