当我想编译 React Native 应用程序时出现以下错误。
Failed to compile.
C:/Users/marci/OneDrive/Pulpit/moja_apka/portal/node_modules/react-native-gesture-handler/lib/module/components/GestureButtons.js
Module not found: Can't resolve 'react-native-web/dist/exports/Animated' in 'C:\Users\marci\OneDrive\Pulpit\moja_apka\portal\node_modules\react-native-gesture-handler\lib\module\components'
以下是我的 package.json 依赖项。
{
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^5.9.4",
"@types/styled-components": "^5.1.10",
"expo": "^41.0.1",
"react": "^17.0.2",
"react-native": "^0.64.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.4.0",
"react-native-webview": "^11.6.4",
"styled-components": "^5.3.0",
"typescript": "^4.3.4"
},
"devDependencies": {
"@types/react-native": "~0.63.2"
}
}
如何解决?
谢谢