Javascript 在iOS模拟器上运行react本机应用程序

Javascript 在iOS模拟器上运行react本机应用程序,javascript,ios,react-native,Javascript,Ios,React Native,所以我尝试在iPhone11-13.2.2模拟器上运行一个简单的react原生应用程序 我键入npm run ios,但我得到了这个 ** BUILD FAILED ** The following build commands failed: CompileC /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/build/confusion/Build/Intermediates.noindex/co

所以我尝试在iPhone11-13.2.2模拟器上运行一个简单的react原生应用程序

我键入
npm run ios
,但我得到了这个

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/build/confusion/Build/Intermediates.noindex/confusion.build/Debug-iphonesimulator/confusion.build/Objects-normal/x86_64/AppDelegate.o /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/confusion/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
        CompileC /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/build/confusion/Build/Intermediates.noindex/confusion.build/Debug-iphonesimulator/confusion.build/Objects-normal/x86_64/main.o /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/confusion/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ ios: `react-native run-ios`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/theodosiostziomakas/.npm/_logs/2019-11-16T12_38_06_754Z-debug.log
我使用了
npm安装
,但仍然一无所获。如何修复该错误

谢谢,
Theo.

或者,您可以从工作区文件运行,有时在ios中从npm运行不会给出确切的错误。 您必须在工作区中运行以下文件,并选择模拟器/iphone,最后启动项目

工作区路径:-ProjectFolder/ios/projectname.xcworkspace