由于引入的三方組件依賴了不同版本的其他組件導(dǎo)致重復(fù)引入
package.json鍵入resolutions你的依賴+版本如
"resolutions": {
"@react-native-community/viewpager": "^3.1.0"
},
刪除你的node_modules文件夾 然后運(yùn)行yarn
開啟Metro時(shí)清緩存
react-native start --reset-cache
方案來源
https://github.com/ptomasroos/react-native-scrollable-tab-view/issues/1056
https://github.com/ant-design/ant-design-mobile-rn/issues/697