Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-7385

Clean up React versions for packages

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Would like Would like
    • None
    • Maintenance

      Summary

      There are a couple of React libraries that are incompatible between different React's versions (16, 17 and 18) and that's why we have to install bu adding `--legacy-peer-deps` as a flag.

      This is not only happening with the master but also with the plugin.

      Pasting an example of an error log:

       

      npm WARN ERESOLVE overriding peer dependency
      npm WARN While resolving: @ariakit/react@0.2.17
      npm WARN Found: react@16.14.0
      npm WARN node_modules/react
      npm WARN   peer react@">=16.8.0" from @emotion/react@11.11.1
      npm WARN   node_modules/@emotion/react
      npm WARN     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.11.0
      npm WARN     node_modules/@emotion/styled
      npm WARN     1 more (@wordpress/components)
      npm WARN   47 more (@emotion/styled, ...)
      npm WARN 
      npm WARN Could not resolve dependency:
      npm WARN peer react@"^17.0.0 || ^18.0.0" from @ariakit/react@0.2.17
      npm WARN node_modules/@ariakit/react
      npm WARN   @ariakit/react@"^0.2.12" from @wordpress/components@25.7.0
      npm WARN   node_modules/@wordpress/components
      npm WARN 
      npm WARN Conflicting peer dependency: react@18.2.0
      npm WARN node_modules/react
      npm WARN   peer react@"^17.0.0 || ^18.0.0" from @ariakit/react@0.2.17
      npm WARN   node_modules/@ariakit/react
      npm WARN     @ariakit/react@"^0.2.12" from @wordpress/components@25.7.0
      npm WARN     node_modules/@wordpress/components
      npm WARN ERESOLVE overriding peer dependency
      npm WARN While resolving: @ariakit/react-core@0.2.17
      npm WARN Found: react@16.14.0
      npm WARN node_modules/react
      npm WARN   peer react@">=16.8.0" from @emotion/react@11.11.1
      npm WARN   node_modules/@emotion/react
      npm WARN     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.11.0
      npm WARN     node_modules/@emotion/styled
      npm WARN     1 more (@wordpress/components)
      npm WARN   47 more (@emotion/styled, ...)
      npm WARN 
      npm WARN Could not resolve dependency:
      npm WARN peer react@"^17.0.0 || ^18.0.0" from @ariakit/react-core@0.2.17
      npm WARN node_modules/@ariakit/react-core
      npm WARN   @ariakit/react-core@"0.2.17" from @ariakit/react@0.2.17
      npm WARN   node_modules/@ariakit/react
      npm WARN 
      npm WARN Conflicting peer dependency: react@18.2.0
      npm WARN node_modules/react
      npm WARN   peer react@"^17.0.0 || ^18.0.0" from @ariakit/react-core@0.2.17
      npm WARN   node_modules/@ariakit/react-core
      npm WARN     @ariakit/react-core@"0.2.17" from @ariakit/react@0.2.17
      npm WARN     node_modules/@ariakit/react
      npm ERR! code ERESOLVE
      npm ERR! ERESOLVE could not resolve
      npm ERR! 
      npm ERR! While resolving: @wordpress/components@25.7.0
      npm ERR! Found: react@18.2.0
      npm ERR! node_modules/@wordpress/components/node_modules/react
      npm ERR!   react@"^18.2.0" from @wordpress/element@5.18.0
      npm ERR!   node_modules/@wordpress/components/node_modules/@wordpress/element
      npm ERR!     @wordpress/element@"^5.18.0" from @wordpress/components@25.7.0
      npm ERR!     node_modules/@wordpress/components
      npm ERR!       dev @wordpress/components@"^25.7.0" from the root project
      npm ERR! 
      npm ERR! Could not resolve dependency:
      npm ERR! peer react@"^18.0.0" from @wordpress/components@25.7.0
      npm ERR! node_modules/@wordpress/components
      npm ERR!   dev @wordpress/components@"^25.7.0" from the root project
      npm ERR! 
      npm ERR! Conflicting peer dependency: react@18.2.0
      npm ERR! node_modules/react
      npm ERR!   peer react@"^18.0.0" from @wordpress/components@25.7.0
      npm ERR!   node_modules/@wordpress/components
      npm ERR!     dev @wordpress/components@"^25.7.0" from the root project
      npm ERR! 
      npm ERR! Fix the upstream dependency conflict, or retry
      npm ERR! this command with --force, or --legacy-peer-deps
      npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
      npm ERR! 
      npm ERR! See /Users/dantovbein/.npm/eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
      npm ERR!     /Users/dantovbein/.npm/_logs/2023-12-28T17_33_14_413Z-debug-0.log 

            Unassigned Unassigned
            dtovbein Dan Tovbein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: