@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、设置 babel.config
module.exports = {
...........
plugins: ['react-native-reanimated/plugin'], //新增
};
3、删除 node_modules 等相关
4、第一次执行 yarn start --reset-cache
然后就成功了。
另外 @react-navigation/drawer 5.x 有一个错误是ERROR TypeError: Cannot read property 'prototype' of undefined, js engine: hermes,直接升级,到6.x
注意同时升级其他相关库