Getting error about DrawerLayoutAndroid after upgrading to Expo sdk 49.0.0

  1. SDK Version: 49.0.0
  2. Platforms(Android/iOS/web/all): iOS (while using expo go)

I have just started working on an existing project. I wanted to update the expo SDK to 49.0.0 version and I did it with the instructions provided in the blog.

The app works fine when I’m navigating around but randomly the following errors

 WARN  Sending `onAnimatedValueUpdate` with no listeners registered.
Error: Unable to resolve module ./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid from C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\react-native\index.js:

None of these files exist:
  * node_modules\react-native\Libraries\Components\DrawerAndroid\DrawerLayoutAndroid(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.cjs|.cjs)
  * node_modules\react-native\Libraries\Components\DrawerAndroid\DrawerLayoutAndroid\index(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.cjs|.cjs)
  15 | import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator';
  16 | import typeof Button from './Libraries/Components/Button';
> 17 | import typeof DrawerLayoutAndroid from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
     |                                         ^
  18 | import typeof FlatList from './Libraries/Lists/FlatList';
  19 | import typeof Image from './Libraries/Image/Image';
  20 | import typeof ImageBackground from './Libraries/Image/ImageBackground';
    at ModuleResolver.resolveDependency (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:114:15)    
    at DependencyGraph.resolveDependency (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\node-haste\DependencyGraph.js:277:43)
    at Object.resolve (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\lib\transformHelpers.js:169:21)
    at Graph._resolveDependencies (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\DeltaBundler\Graph.js:473:35)
    at Graph._processModule (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\DeltaBundler\Graph.js:261:38)
    at async Graph._addDependency (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\DeltaBundler\Graph.js:372:20)
    at async Promise.all (index 2)
    at async Graph._processModule (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\DeltaBundler\Graph.js:322:5)
    at async Graph._addDependency (C:\Users\Artik\Documents\DevPSInet\PaySimply-Mobile\node_modules\metro\src\DeltaBundler\Graph.js:372:20)
    at async Promise.all (index 1)

Here are the versions of some of the related libraries.

"@react-navigation/drawer": "^6.6.3",
"@react-navigation/stack": "^6.3.17",
"expo": "^49.0.0",
"react-native": "0.72.3",
"react-native-gesture-handler": "~2.12.0",
"react-native-reanimated": "^3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",


node version: v16.20.1
npm version: 8.19.4

I’ve tried individually upgrading the @react-navigation/drawer and @react-navigation/stack to the latest compatible versions but still got the same errors.
Please let me know if more information is needed.
Please let me know if this is a known issue, or if there are any fixes.
Thank you

i have same issue on the ios devclient build, no solution yet.

I’m having the same issue, did either of you manage to find a solution or workaround? Thanks!

Same issue here. Any resolutions yet?

can someone share a minimal reproducible example project please?

In my case, the error is happening very unpredictably but I have noticed that this appears mostly when using gestures (e.g. swiping left to right to go back to the previous screen) to navigate between the screens using react-router.

After upgrading to 49, I appear to get this error whenever an unrelated error/warning is thrown.

For example, adding:

{[...Array(5)].map(() => (
    <Text>Example</Text>
))}

Will give you a console error of “Each child in a list should have a unique “key” prop.”, but it also logs an error complaining about missing files:
“…node_modules/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json|.native.cjs|.cjs|.native.svg|.svg|.native.mjs|.mjs|.native.cjs|.cjs)”

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.