Replies: 1 comment
-
This one is old, but weirdly, I'm facing the same on iOS with RN 78 new architecture off Note: I'm pulling Updated: On my side, it ended up being the import probably from legacy migrated code: import DocumentPicker from '@react-native-documents/picker';
const test = () => (DocumentPicker.pick(...)) // pick is undefined After import { pick } from '@react-native-documents/picker';
const test = () => (pick(...)) //works |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug report
Summary
PLEASE HELP !!! I try to use DocumentPicker.pick for file picking, but it keeps throwing error "TypeError: undefined is not an object (evaluating 'RNDocumentPicker.pick')". I traces down this error, and it leads to "node_modules/react-native-document-picker/src/index.tsx" THIS FILE
The NativeModules seems not to exist (is blank object {} ), even when I change import line, can import NativeModules and log it out, it does not contain RNDocumentPicker.
Therefore, NativeModules.RNDocumentPicker is null, and RNDocumentPicker is NULL !?
Reproducible sample code
I catch the error and log it there: TypeError: undefined is not an object (evaluating 'RNDocumentPicker.pick')
Steps to reproduce
In package.json: "react-native-document-picker": "^8.2.0",
Describe what you expected to happen:
What I have already done
Environment info
npx react-native info
output:library version: 8.2.0
iOS / Android version: unknown
I ran on Android simulator (of Android Studio)
Similar issue:
Beta Was this translation helpful? Give feedback.
All reactions