繁体   English   中英

无法解析模块`scheduler/tracing` react native

[英]Unable to resolve module `scheduler/tracing` react native

我在 react-native run-android 进程中遇到这样的错误

error: bundling failed: Error: Unable to resolve module `scheduler/tracing` from `/Users/miftahali/projects/react/appscustomec/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js`: Module `scheduler/tracing` does not exist in the Haste module map

这是我的环境

React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (4) x64 Intel(R) Core(TM) i5-4260U CPU @ 1.40GHz
      Memory: 38.67 MB / 4.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.0.0 - ~/.nvm/versions/node/v10.0.0/bin/node
      npm: 5.6.0 - ~/.nvm/versions/node/v10.0.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 19, 20, 23, 25, 26, 27
        Build Tools: 23.0.1, 25.0.3, 26.0.1, 27.0.3, 28.0.3
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1 
      react-native: ^0.57.8 => 0.57.8 
    npmGlobalPackages:
      create-react-native-app: 1.0.0

这个怎么解决啊,谢谢

这种类型的错误是由于依赖相关的问题引起的。 只需尝试删除 node_module 并尝试重新安装 node_module。

只要确保在 app.json 中更新这个,将 sdkVersion 更改为“33.0.0”并将 package.json 更改为 //react-native 到“ https://github.com/expo/react-native/archive/sdk-33.0 .0.tar.gz " //expo to "^33.0.0" //react to "16.8.3" —(这个确切的版本)用这些东西

如果您使用“react-native”:“^0.59.8”,请将您的反应更新为“react”:“16.8.5”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM