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 undefinedAfter 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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
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 infooutput:info Fetching system and libraries information... System: OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa) CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz Memory: 7.14 GB / 15.45 GB Shell: 5.8 - /usr/bin/zsh Binaries: Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.0/bin/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm Watchman: Not Found SDKs: Android SDK: Not Found IDEs: Android Studio: Not Found Languages: Java: 11.0.18 - /usr/bin/javac Python: 2.7.18 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: ^0.71.7 => 0.63.4 npmGlobalPackages: *react-native*: Not Foundlibrary 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