在 Expo 项目上安装 React Native 测试库(使用 React 18)时出现错误

问题描述 投票:0回答:1

我有一个 Expo 应用程序(最后一次使用 React 18 的博览会),我想对其进行一些测试

但是当尝试安装 React Native 测试库时,我收到此错误:

enter image description here

我想知道这个错误是否意味着它与React 18不兼容

你建议我做什么?

提前致谢

拉斐尔

reactjs react-native expo react-native-testing-library
1个回答
0
投票

我通过使用解决了这个问题:

npm install --save-dev @testing-library/react-native --legacy-peer-deps

© www.soinside.com 2019 - 2024. All rights reserved.