Import error report under react-native-doc-viewer Android

ask for help! I have operated
https://github.com/philipphec.

according to the following steps

after import OpenFile from "react-native-doc-viewer";,
undefined is not an object (evaluating" RNReactNativeDocViewer.openDoc")

appears.

is there anyone who has encountered it, or do you have any other components that are better for opening doc/pdf?

my version is
"react-native": "0.54.2",
"react-native-doc-viewer": "^ 2.7.8",

Mar.05,2021

this depends on the native implementation, did you link successfully?


find your own solution.
reason: npm install react-native-doc-viewer package installation missing file
solution: manually download the compressed package file from https://github.com/philipphec., extract and find the. / windows folder, and copy it to. / node_modules/react-native-doc-viewer

Menu