Michaelvilleneuve / react-native-document-scanner

Document scanner, features live border detection, perspective correction, image filters and more ! 📲📸
MIT License
843 stars 289 forks source link

Instructions to run the Example app #32

Closed SrujithPoondla closed 6 years ago

SrujithPoondla commented 6 years ago

These are the steps i followed to run the Example app.

  1. git clone https://github.com/Michaelvilleneuve/react-native-document-scanner.git
  2. cd react-native-documrnt-scanner/Example
  3. npm install
  4. react-native run-ios

This is the error i am getting

error: bundling: UnableToResolveError: Unable to resolve module `react` from `/Users/srujithpoondla/react-native-document-scanner/index.js`: Module does not exist in the module map or in these directories:
  /Users/srujithpoondla/node_modules

But react module is available in node_modules. Are there any specific instructions to run the example app?

Thanks!

Michaelvilleneuve commented 6 years ago

The steps you followed seem correct. Try to uninstall react from your node_modules and install it again ?

SrujithPoondla commented 6 years ago

I tried uninstalling all the node modules and reinstalling. It didn’t work. Any other suggestions?

Now i am trying to use directly in an app. After using react native link, still do i need to add camera to the permissions in xcode and android?

Michaelvilleneuve commented 6 years ago

Nope, it should already be working !

Yes you need to add permissions

SrujithPoondla commented 6 years ago

Could you please test with the latest react native release. I am unable to run the example and also when I try to use the component I am getting the error

[20:49:30] Invariant Violation: Native component for "RNPdfScanner" does not exist

This error is located at:
    in RNPdfScanner (at index.js:31)
    in PdfScanner (at App.js:14)
    in RCTView (at View.js:60)
    in View (at App.js:13)
    in RCTView (at View.js:60)
    in View (at App.js:9)
    in App (at registerRootComponent.js:35)
    in RootErrorBoundary (at registerRootComponent.js:34)
    in ExpoRootComponent (at renderApplication.js:33)
    in RCTView (at View.js:60)
    in View (at AppContainer.js:102)
    in RCTView (at View.js:60)
    in View (at AppContainer.js:122)
    in AppContainer (at renderApplication.js:32)
- node_modules/react-native/Libraries/ReactNative/requireNativeComponent.js:107:6 in getViewConfig
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:14131:17 in get$1
- ... 20 more stack frames from framework internals
Michaelvilleneuve commented 6 years ago

Unfortunately I don't have time to maintain this package anymore. I am just trying to help whenever I can.

Feel free to submit PRs and I will look into it