You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
/// Line 1import{Platform,NativeModules,ModalPropsIOS}from'react-native'/// Line 27constRNDocumentPicker: DocumentPickerType=NativeModules.RNDocumentPicker
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 !?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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