インポートエラーの試行:「EasingNode」は「react-native-reanimated」からエクスポートされません

Aug 17 2020

Expoアプリで@ react-navigation / stackを使用していますが、すべて正常に機能しています。アプリにタブ/ドロワーナビゲーションを追加し始め、インポートしようとすると次の2つのエラーが発生し続けたいと思いました

import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
Attempted import error: 'EasingNode' is not exported from 'react-native-reanimated'.

そして

Attempted import error: 'Appearance' is not exported from 'react-native-web/dist/index'.

以下は私のpackage.jsonです:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.11.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/material-bottom-tabs": "^5.2.16",
    "@react-navigation/material-top-tabs": "^5.2.16",
    "@react-navigation/native": "^5.7.3",
    "@react-navigation/stack": "^5.9.0",
    "@reduxjs/toolkit": "^1.4.0",
    "expo": "~38.0.8",
    "expo-status-bar": "^1.0.2",
    "react": "~16.11.0",
    "react-dom": "~16.11.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
    "react-native-elements": "^2.2.1",
    "react-native-gesture-handler": "~1.6.0",
    "react-native-paper": "^4.0.1",
    "react-native-reanimated": "~1.9.0",
    "react-native-safe-area-context": "~3.0.7",
    "react-native-screens": "~2.9.0",
    "react-native-tab-view": "^2.15.1",
    "react-native-web": "~0.11.7",
    "react-redux": "^7.2.1",
    "redux": "^4.0.5"
  },
  "devDependencies": {
    "@babel/core": "^7.8.6",
    "babel-preset-expo": "~8.1.0"
  },
  "private": true
}

この問題を解決するために、まったく新しいExpoアプリを作成しましたが、下部/上部のタブナビゲーターをインポートすると、まだ壁にぶつかります。これを解決する方法はありますか?

回答

2 Lpaydat Sep 05 2020 at 23:22

問題react-native-paper4.0.0-alpha.1解決するためにダウングレードします。と[email protected]互換性がないようでしたreact-native-paper@^4.0.1