Secretmapper / react-image-annotation

An infinitely customizable image annotation library built on React
https://secretmapper.github.io/react-image-annotation/
MIT License
326 stars 135 forks source link

Compatibility with React 18 and Missing TypeScript Types #87

Open ranyakhemiri opened 1 year ago

ranyakhemiri commented 1 year ago

Description: I'm currently using react-image-annotation in a project that has been upgraded to React 18. However, I'm facing compatibility issues with React 18 and I'm also missing TypeScript types for the package.

Expected Behavior: react-image-annotation should be compatible with React 18 since it is compatible with React 16 or higher.

Actual Behavior: The package throws errors related to compatibility with React 18 and does not provide TypeScript types, which makes it challenging to use in a TypeScript project with React 18.

Error Messages:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-image-annotation@0.9.10
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   peer react@">= 16.14.0" from @aws-amplify/ui-react@4.6.1
npm ERR!   node_modules/@aws-amplify/ui-react
npm ERR!     @aws-amplify/ui-react@"^4.6.1" from the root project
npm ERR!   peer react@">= 16.14.0" from @aws-amplify/ui-react-core@2.1.20
npm ERR!   node_modules/@aws-amplify/ui-react-core
npm ERR!     @aws-amplify/ui-react-core@"2.1.20" from @aws-amplify/ui-react@4.6.1
npm ERR!     node_modules/@aws-amplify/ui-react
npm ERR!       @aws-amplify/ui-react@"^4.6.1" from the root project
npm ERR!   50 more (@xstate/react, @floating-ui/react-dom, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3" from react-image-annotation@0.9.10
npm ERR! node_modules/react-image-annotation
npm ERR!   react-image-annotation@"^0.9.10" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@16.14.0
npm ERR! node_modules/react
npm ERR!   peer react@"^16.3" from react-image-annotation@0.9.10
npm ERR!   node_modules/react-image-annotation
npm ERR!     react-image-annotation@"^0.9.10" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.