opencv-js icon indicating copy to clipboard operation
opencv-js copied to clipboard

unable to implement in react native 0.67

Open gowthambalashanmugam opened this issue 2 years ago • 6 comments

Facing below error when i tried to implement it, Can anyone help us to sort it out?

error: RangeError: Maximum call stack size exceeded at RegExp.exec () at tokenize (/Users/comp/work/mobile-app/react-mob-app/node_modules/@babel/highlight/lib/index.js:67:38) at tokenize.next () at highlightTokens (/Users/comp/work/mobile-app/react-mob-app/node_modules/@babel/highlight/lib/index.js:84:3) at highlight (/Users/comp/work/mobile-app/react-mob-app/node_modules/@babel/highlight/lib/index.js:112:12) at codeFrameColumns (/Users/comp/work/mobile-app/react-mob-app/node_modules/@babel/code-frame/lib/index.js:103:65) at UnableToResolveError.buildCodeFrameMessage (/Users/comp/work/mobile-app/react-mob-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:264:12) at new UnableToResolveError (/Users/comp/work/mobile-app/react-mob-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:223:35) at ModuleResolver.resolveDependency (/Users/comp/work/mobile-app/react-mob-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:129:15) at DependencyGraph.resolveDependency (/Users/comp/work/mobile-app/react-mob-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/node-haste/DependencyGraph.js:288:43)

gowthambalashanmugam avatar Aug 21 '22 16:08 gowthambalashanmugam

I get the same error. I've attempted a few things: none of which have helped.

  1. switched from trying it in an Expo-based project to a normal ReactNative project.
  2. Tried only importing the methods I need (starting with import {imread} from '@techstark/opencv-js';) and even just including that single function causes the same problem.

For added context, this error occurs after (or perhaps right at the end) of bundling. react-native start react-native (or npm start) works without errors. Then run-android (or npm run android) seems to work fine up until 100% when it launches the app on your phone/emulator. Once that happens, you see the error above in the console and in the error dialog within the app.

FabledWeb avatar Oct 04 '22 01:10 FabledWeb

I couldn't resolve that, else we can integrate OpenCV 3.4.1 as a native plugin which causes more weightage of the app but no option.

gowthambalashanmugam avatar Oct 07 '22 06:10 gowthambalashanmugam

error: RangeError: Maximum call stack size exceeded

I get this error too on react-native 0.71.8 and expo ~48.0.15.

Any solutions?

pepperav avatar May 29 '23 09:05 pepperav

I have the same issue

thanhnv2303 avatar May 31 '23 17:05 thanhnv2303