react-pannellum icon indicating copy to clipboard operation
react-pannellum copied to clipboard

ERESOLVE unable to resolve dependency tree

Open omkarap55 opened this issue 2 years ago • 8 comments

Unable to install react-pannellum on projects, where react version used in project is different than that of react-pannellum(react: 17.0.2)

How to reproduce this bug?

  1. npx create-react-app sample-app
  2. npm i react-pannellum

omkarap55 avatar Jul 11 '22 13:07 omkarap55

Hi @omkarap55 can you provide more detail about this issue (error image, your libs version)?

hoaiduyit avatar Jul 12 '22 09:07 hoaiduyit

Hi @hoaiduyit I am unable to install react-pannellum on react version older than 17.0.2 . Pl refer screenshot image

Also unable to install react-pannellum on newer react version after react 17.0.2 . Pls refer screenshot image

omkarap55 avatar Jul 12 '22 12:07 omkarap55

Has this been resolved?

MauriceMorrey avatar Jul 21 '22 22:07 MauriceMorrey

let me take a look

hoaiduyit avatar Jul 31 '22 03:07 hoaiduyit

I am experiencing the same problem, but in my case the React version is react@"^18.2.0"

nikakhachi avatar Jul 31 '22 16:07 nikakhachi

run this cmd

npm i react-pannellum --legacy-peer-deps

it may resolve your issue

aliMurtaja avatar Mar 15 '23 12:03 aliMurtaja

npm i react-pannellum --legacy-peer-deps doesn't work for me and looks like not very production solution.

try to override dependency in your package.json

  "overrides": {
    "react-pannellum": {
      "react": "$react",
      "react-dom": "$react-dom"
    }
  }

notnotzero avatar Jun 16 '23 09:06 notnotzero

Hi @hoaiduyit,

We are also experiencing build issues due to an upgrade to node 18. The issues seems to lie with newer versions of npm. They require the version of the specified peerDependency to match the one found. If it isn't found, it will fail the build. You can find some more details on this stackoverflow answer.

As previously mentioned, it can be bypassed using the legacy-peer-deps flag, but that's not a very good solution.

This can be fixed by allowing a range of versions for the peerDependencies. In our case for example, we've been on react 18.2.0 for a while, and haven't experienced any issues with the package. But due to our node upgrade it is now breaking the build.

I've opened a pull request (#107) that will fix these issues. Can you have a look?

sproclavism avatar Oct 26 '23 07:10 sproclavism