gpt4 book ai didi

javascript - 无法解析 babel-runtime/regenerator

转载 作者:太空宇宙 更新时间:2023-11-04 00:07:29 26 4
gpt4 key购买 nike

尝试运行 react native 项目,但我收到此错误:

Unable to resolve "/Users/bobby/node_modules/babel-runtime/regenerator" from "App.js"

此问题有哪些可能的解决方案?

我的 iOS 模拟器出现红屏并显示以下内容:

Unable to resolve module /Users/bobby/node_modules/babel-runtime/regenerator from /Users/bobby/Desktop/mstore/src/App.js: The module /Users/bobby/node_modules/babel-runtime/regenerator could not be found from /Users/bobby/Desktop/mstore/src/App.js. Indeed, none of these files exist:

  • /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_0RCTFatal 37-[ABI28_0_0RCTCxxBridge handleError:]_block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE __CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main start 0x0

最佳答案

更新你的 npm:

npm i npm@latest -g

您需要重新安装babel-runtime,您的依赖项中需要有 babel-runtime@6。

npm i babel-runtime

关于javascript - 无法解析 babel-runtime/regenerator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51546089/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com