react-native-pdf - can this run in Expo application. When build as apk it works. but not in expo emulator

Hi,

sdkVersion" : "48.0.0

react-native-pdf works when a build is built using eas. eg:

eas build -p android

( Add plugins in ap.json)
“plugins”: [
@config-plugins/react-native-blob-util”,
@config-plugins/react-native-pdf”
]

But when run in interactive

eg expo start -c

expo fails to run with message similar :
TypeError: Cannot read property ‘DocumentDir’ of null, js engine: hermes
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:102:17 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:148:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError
at node_modules/expo/build/errors/ExpoErrorManager.js:25:19 in errorHandler
at node_modules/expo/build/errors/ExpoErrorManager.js:30:24 in
at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules/metro-runtime/src/polyfills/require.js:225:40 in guardedLoadModule
at node_modules/metro-runtime/src/polyfills/require.js:127:23 in metroRequire
at http://192.168.68.76:19000/index.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in global

Invariant Violation: “main” has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn’t called., js engine: hermes
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:102:17 in reportException
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:148:19 in handleException
  • … 7 more stack frames from framework internals

Not sure why expo simulation not picking this up.

Thanks

Regards

Justin