gpt4 book ai didi

node.js - Haste 模块映射中不存在模块 `scheduler`

转载 作者:行者123 更新时间:2023-12-02 15:54:47 26 4
gpt4 key购买 nike

我正在尝试运行现有的博览会项目。我已经克隆了它并运行了 yarn ,然后博览会开始了。并收到此错误:

无法从 /path-to-project/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-prod.js 解析模块 scheduler:模块 scheduler Haste 模块映射中不存在

这可能与 https://github.com/facebook/react-native/issues/4968 有关

尝试通过以下方式解决:

  1. 清晰的守望者 watch :watchman watch-del-all
  2. 删除 node_modules 文件夹:rm -rf node_modules && npm install
  3. 重置 Metro Bundler 缓存:rm -rf/tmp/metro-bundler-cache-*npm start -- --reset-cache
  4. 删除加速缓存:rm -rf/tmp/haste-map-react-native-packager-*
  5. 多次删除并克隆项目
  6. 删除了node_modules并重新安装
  7. 重新安装了 watchman、npm 并更新了brew。
  8. 安装了最新版本的计划包 (0.5.0),而不是 (0.4.0)

线索:尝试运行 iOS 模拟器时,budling 卡在 %99

Building JavaScript bundle [================================= ] 99%

之后:

Failed building JavaScript bundle.

最佳答案

通过将这些版本添加到我的项目中来解决。

"expo": "^35.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-web": "^0.11.7"

但是,我在更新 expo 版本时遇到了其他问题。

关于node.js - Haste 模块映射中不存在模块 `scheduler`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58119926/

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