MelihAltintas / vue3-openlayers

Web map Vue 3.x components with the power of OpenLayers
https://vue3openlayers.netlify.app/
MIT License
629 stars 120 forks source link

Can't install vue3-openlayers 6.0.1 due to dependencies errors #308

Closed lmc3s3f0r closed 3 months ago

lmc3s3f0r commented 4 months ago

Describe the bug Tried to upgrade to vue3-openlayers 6.0.1, so I added these dependencies to my project's package.json:

"ol-contextmenu": "^5.3.0",
"ol-ext": "^4.0.15",
"ol": "^9.0.0",
"vue": "3.4.21",
"vue3-openlayers": "^6.0.1"

And when I run npm install, I instantly get these error messages:

npm ERR! While resolving: nemus-dashboard@0.13.0
npm ERR! Found: ol@9.0.0
npm ERR! node_modules/ol
npm ERR!   ol@"^9.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer ol@"> 7.x <= 8.x" from ol-contextmenu@5.3.0
npm ERR! node_modules/ol-contextmenu
npm ERR!   ol-contextmenu@"^5.3.0" from the root project

Which I can confirm in ol-contextmenu's package.json: https://github.com/jonataswalker/ol-contextmenu/blob/master/package.json

 "peerDependencies": {
        "ol": "> 7.x <= 8.x"
    },

Affected version(s) 6.0.1

To Reproduce Steps to reproduce the behavior:

  1. Add this to your project's package.json:
    "ol-contextmenu": "^5.3.0",
    "ol-ext": "^4.0.15",
    "ol": "^9.0.0",
    "vue": "3.4.21",
    "vue3-openlayers": "^6.0.1"
  2. Delete node_modules and package-lock.json
  3. Run npm intall
  4. See error

Expected behavior I'd expect being able to install without issues.

Desktop (please complete the following information):

d-koppenhagen commented 4 months ago

Hey, please check out the issue here with the workaround for your package.json:

"overrides": {
    "ol-contextmenu": {
      "ol": "^9.x"
    }
  }

ol-contextmenu will be updated hopefully soon. The override should be fine for now, since there is no breaking change from OpenLayers 9 which breaks ol-contextmenu.

d-koppenhagen commented 4 months ago

I created a PR: https://github.com/jonataswalker/ol-contextmenu/pull/278

d-koppenhagen commented 3 months ago

fixed with version 6.1.1