[英]Failed to resolve module specifier "babel-runtime/regenerator"
[英]Unable to resolve babel-runtime/regenerator
尝试运行React-Native项目,但出现此错误:
Unable to resolve "/Users/bobby/node_modules/babel-runtime/regenerator" from "App.js"
有什么可能的解决方案来解决这个问题?
我的iOS模拟器给我一个红屏,然后说:
无法从
/Users/bobby/Desktop/mstore/src/App.js
解析模块/Users/bobby/node_modules/babel-runtime/regenerator
:/Users/bobby/Desktop/mstore/src/App.js
模块/Users/bobby/node_modules/babel-runtime/regenerator
来自/Users/bobby/Desktop/mstore/src/App.js
。 实际上,这些文件都不存在:
/Users/bobby/node_modules/babel-runtime/regenerator(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)
/Users/bobby/node_modules/babel-runtime/regenerator/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)
ABI28_0_0RCTF类别37- [ABI28_0_0RCTCxx桥句柄错误:] _ block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE RunLoopRunMainApplicationDRunRunRunApplicationLoopRuningApplicationRun
安装babel / poylfill并将其放在应用程序入口点的顶部
更新您的npm:
npm i npm@latest -g
您需要重新安装babel-runtime
,您的依赖项中需要有babel-runtime @ 6。
npm i babel-runtime
在macOS Mojave(测试版软件)上。 降级为最新的稳定发行版本(High Sierra),现在一切似乎都可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.