jonathanpalma / react-native-tesseract-ocr

Tesseract OCR wrapper for React Native
MIT License
558 stars 172 forks source link

compile with React Native 0.68.1 2 pbs #131

Closed Productivix closed 1 year ago

Productivix commented 2 years ago

thanks for the code and integration. Describe the bug

I installed the packages in a fresh 0.681 RN app. yarn react-native run-android gives me 2 failures :

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

Dependencies (please complete the following information): "react": "17.0.2", "react-native": "0.68.1",

To Reproduce Steps to reproduce the behavior:

  1. installed the packages in a fresh 0.681 RN app. yarn add ...
  2. yarn react-native run-android
  3. see errors (up)

Expected behavior a build

Smartphone (please complete the following information):

Additional context

Thank you , regards William

yestay90 commented 2 years ago

@Productivix , did you fork and updated project from react 0.62.2 to 0.68.1? I ask it cause when you install this package you should get error saying that you react version is higher. I forked this project and updated it from react native 62 to 64. I am running on iOS and getting error. Can you check on iOS ? Do you have the same error?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Productivix commented 2 years ago

hi @yestay90 , sorry I did not see your answer - What do you mean as solution exactly ? I installed a fresh RN and then the module . Do you mean that install a version of RN adapted to the module and then upgrade ?

Productivix commented 2 years ago

ok : test :

import TesseractOcr, {LANG_ENGLISH} from 'react-native-tesseract-ocr'; import {useEventListener} from 'react-native-tesseract-ocr';

const tessOptions = {}; TesseractOcr.recognize(imageSource, LANG_ENGLISH, tessOptions);

const App = () => { const [progress, setProgress] = useState(0); useEventListener('onProgressChange', p => { setProgress(p.percent / 100); }); return (

hello test ocr

); };

export default App; ''' so now , upgrade of the whole to 0.69.1 ...? https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.69.1 : a lot of manual work !!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.