问题描述
反应本机环境信息:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz
Memory: 559.26 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.0.0 => 16.0.0
react-native: ^0.57.3 => 0.57.3
npmGlobalPackages:
react-native-cli: 2.0.1
这是本机信息来自GitHub的类似解决方案对我不起作用
here is react-native infosimilar solutions from GitHub does not work for me
推荐答案
出现错误是由于 schedule/tracking
从重命名为
到 schedule/tracing
[email protected] [email protected]
.
The error appears due to the renaming of schedule/tracking
to schedule/tracing
from [email protected]
to [email protected]
.
通过为您的 react-native
版本选择正确的 react
版本,可以解决此问题:
The issue is resolved by choosing the correct version of react
for your react-native
version:
- RN< = 0.57.2->反应< = 16.5.1
- 在这种情况下,请确保锁定您的React版本.您的package.json应该如下所示:
[email protected]
.检查版本之前是否没有任何^
. - (在package.json中包含
react@^16.5.1
可能会解析为反应版本> = 16.5.1,这将不起作用) - 示例命令:
yarn add [email protected]
- RN <= 0.57.2 --> react <= 16.5.1
- Be sure to lock your react version in this case. Your package.json should look like this:
[email protected]
. Check that there isn't any^
before the version. - (having
react@^16.5.1
in your package.json may resolve to a react version >= 16.5.1, which will NOT work) - example command:
yarn add [email protected]
- 示例命令:
yarn add [email protected]
有关更多信息,您可以查看 Github问题#21150 和 Github版本#21140 .
For further Information you can check the Github Issue #21150 and Github Issue #21140.
Expo用户的注释:
如果您使用的是expo,请注意expo< = 32.0.0使用的是react-native版本< = 0.57.2,因此将要求react的版本是< = 16.5.1
If you are using expo, be aware that expo <= 32.0.0 uses a react-native version <= 0.57.2 and therefore will require the react version to be <= 16.5.1
如果不能立即使用
在继续操作之前,尝试重置打包程序的缓存:
yarn start --reset-cache
Try to reset the cache of your packager before continuing:
yarn start --reset-cache
这篇关于急速模块图中不存在模块计划/跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- Be sure to lock your react version in this case. Your package.json should look like this:
- 在这种情况下,请确保锁定您的React版本.您的package.json应该如下所示: