Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 反应本族语:Can';t在iOS上正确运行应用程序“;未能加载包(http://localhost:8081/index.bundle?"_Javascript_Ios_React Native - Fatal编程技术网

Javascript 反应本族语:Can';t在iOS上正确运行应用程序“;未能加载包(http://localhost:8081/index.bundle?"

Javascript 反应本族语:Can';t在iOS上正确运行应用程序“;未能加载包(http://localhost:8081/index.bundle?",javascript,ios,react-native,Javascript,Ios,React Native,尝试运行react本机iOS应用程序时,我收到一个带有错误的红色页面。这是我在iOS屏幕上遇到的以下错误 Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Unable to resolve module ./node_modules/react-native/src/constants/screens from/Use

尝试运行react本机iOS应用程序时,我收到一个带有错误的红色页面。这是我在iOS屏幕上遇到的以下错误

 Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Unable to resolve module ./node_modules/react-native/src/constants/screens from/Users/username/Desktop/mobile/App.js: The module ./node_modules/react-native/src/constants/screens could not be found from /Users/username/Desktop/mobile/App.js. Indeed, none of these files exist:

/Users/username/Desktop/mobile/node_modules/react-native/src/constants/screens(.native||.ios.jsx|.native.jsx|.jsx|.ios.js|.native.js|.js|.ios.js|.native.js|.js|.ios.json|.native.json|.json)`

 /Users/username/Desktop/mobile/node_modules/react-native/src/constants/screens/index(.native||.ios.jsx|.native.jsx|.jsx|.ios.js|.native.js|.js|.ios.js|.native.js|.js|.ios.json|.native.json|.json) (null))

__38-[RCTCxxBridge loadSource:onProgress:]_block_invoke.245
    RCTCxxBridge.mm:420
___ZL36attemptAsynchronousLoadOfBundleAtURLP5NSURLU13block_pointerFvP18RCTLoadingProgressEU13block_pointerFvP7NSErrorP9RCTSourceE_block_invoke.118
__80-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]_block_invoke
-[RCTMultipartStreamReader emitChunk:headers:callback:done:]
-[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:]
-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]
__88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke
__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
-[NSBlockOperation main]
-[__NSOperationInternal _start:]
_dispatch_client_callout
_dispatch_block_invoke_direct
_dispatch_client_callout
_dispatch_block_invoke_direct
dispatch_block_perform
__NSOQSchedule_f
_dispatch_client_callout
_dispatch_continuation_pop
_dispatch_async_redirect_invoke
_dispatch_root_queue_drain
_dispatch_worker_thread3
_pthread_wqthread
start_wqthread

我试图通过查看其他stackoverflow帖子来解决这个问题。但是,到目前为止,没有一个解决方案对我有效。我真的很困惑,不知道该怎么办。非常感谢任何帮助或建议。

快速修复:npm add@babel/runtime


然后:rm-rfios/build/;kill$(lsof-t-i:8081);react native run ios

你能添加你的RN版本,也许还有你的项目依赖性吗?这个脚本做什么,因为我显然不明白它的用途,我用它来修复它没有修复的其他东西,我知道我收到一个错误,说“无法连接到开发服务器hey@prog”添加babel/run的第一行时间包和第二个清除旧构建并终止端口上的任何操作,最后重新开始运行