mosch / react-avatar-editor

Small avatar & profile picture component. Resize and crop uploaded images using a intuitive user interface.
https://react-avatar-editor.netlify.app/
MIT License
2.37k stars 369 forks source link

Warning: unmet peer dependency @babel/core #373

Closed winterbe closed 2 years ago

winterbe commented 2 years ago

Hi,

first, I want to say thank you for this awesome library. πŸ’›

When I upgrade from version 11.0.9 to 13.0.0 I get the following warnings:

❯ yarn install
yarn install v1.22.19
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning "react-avatar-editor > @babel/plugin-transform-runtime@7.18.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-avatar-editor > @babel/plugin-transform-runtime > babel-plugin-polyfill-regenerator@0.3.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-avatar-editor > @babel/plugin-transform-runtime > babel-plugin-polyfill-corejs3@0.5.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-avatar-editor > @babel/plugin-transform-runtime > babel-plugin-polyfill-corejs2@0.3.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-avatar-editor > @babel/plugin-transform-runtime > babel-plugin-polyfill-regenerator > @babel/helper-define-polyfill-provider@0.3.1" has unmet peer dependency "@babel/core@^7.4.0-0".
warning "react-avatar-editor > @babel/plugin-transform-runtime > babel-plugin-polyfill-regenerator > @babel/helper-define-polyfill-provider > @babel/helper-compilation-targets@7.18.2" has unmet peer dependency "@babel/core@^7.0.0".

My project is build with TypeScript and Webpack without Babel. However react-avatar-editor seems to work properly in my application despite the warnings. So I guess the peer dependency to Babel is related to building the packages from source? Maybe you could remove the peer dependency warnings so end-users without Babel don't get confused? Or is Babel indeed mandatory for react-avatar-editor to work properly in production? I'd prefer not to add Babel to my project if it's not necessary.

Thanks in advance for your help. πŸ‘

Regards πŸ‘‹

dan-lee commented 2 years ago

Hey @winterbe, I think you can safely ignore those warnings as they are only devDependencies related. You can also check out react-avatar-editor@14.0.0-beta.0 where we completely replaced the build architecture.

winterbe commented 2 years ago

@dan-lee Thanks for the clarification. I've tested 14.0.0-beta.0 and the warnings are gone. πŸ‘