@react-navigation/drawer 6.x 遇到
ERROR TypeError: Cannot read property 'isConfigured' of undefine
解決的方案:
1、升級
"@react-navigation/drawer": "6.6.13",
? ? "@react-navigation/native": "6.1.16",
? ? "@react-navigation/stack": "6.3.28",
2、設(shè)置?babel.config
module.exports = {
...........
? plugins: ['react-native-reanimated/plugin'], //新增
};
3、刪除 node_modules 等相關(guān)
4、第一次執(zhí)行 yarn start --reset-cache
然后就成功了。
另外?@react-navigation/drawer 5.x 有一個錯誤是ERROR TypeError: Cannot read property 'prototype' of undefined, js engine: hermes,直接升級,到6.x
注意同時升級其他相關(guān)庫