hoaiduyit / react-pannellum

46 stars 38 forks source link

ERESOLVE unable to resolve dependency tree #94

Open omkarap55 opened 2 years ago

omkarap55 commented 2 years ago

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
hoaiduyit commented 2 years ago

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

omkarap55 commented 2 years ago

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

MauriceMorrey commented 2 years ago

Has this been resolved?

hoaiduyit commented 2 years ago

let me take a look

nikakhachi commented 2 years ago

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

aliMurtaja commented 1 year ago

run this cmd

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

it may resolve your issue

notnotzero commented 1 year ago

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"
    }
  }
sproclavism commented 10 months ago

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?