vinzscam / react-native-file-viewer

Native file viewer for React Native. Preview any type of file supported by the mobile device.
MIT License
434 stars 102 forks source link

Invariant Violation: Native module cannot be null #118

Closed AchrafBn closed 2 years ago

AchrafBn commented 3 years ago

After installing automatically and import FileViewer in my file i am getting error , i tried to add this line in my podfile,i got same error,

pod 'RNFileViewer', :path => '../node_modules/react-native-file-viewer'

Versions

   "expo": "~42.0.1",
    "react-native": "~0.63.4",
    "react-native-file-viewer": "^2.1.4",
moaIIim commented 3 years ago

did you eject fully from expo? the component won't work with expo.

vinzscam commented 3 years ago

Hi @AchrafBn,

as you're on RN 63, no extra action is required for installing the package, since autolinking should do the trick. Anyway, as @moaIIim mentioned, please check that your application is an ejected RN application, since this is required by the library.