vinzscam/react-native-file-viewer

Invariant Violation: Native module cannot be null

AchrafBn opened this issue · 2 comments

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",

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

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.