ERROR [Uppy] undefined is not an object evaluating REQUIRE dependencyMap "nanoid") nanoid')

I’m using @uppy/core to upload some images in my react native app. When I run it and at the point of upload it throws this error

ERROR  [Uppy] [15:56:40] undefined is not an object (evaluating '_$_REQUIRE(_dependencyMap[21], "nanoid").nanoid')
 LOG  [TypeError: undefined is not an object (evaluating '_$_REQUIRE(_dependencyMap[21], "nanoid").nanoid')]
 
 ERROR  Error: React Native does not have a built-in secure random generator. If you don’t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.

 

This error disappears and upload works fine if I connect it to devtools using chrome. But it’s not a solution because the error persists when I export an APK out.

adding this library and importing it into App.tsx solved my issue. But then why this is not in the documentation?