I am trying to npm install vue-mapbox mapbox-gl, and I'm getting a dependency tree error.
I'm running Nuxt.js SSR with Vuetify and haven't installed anything related to Mapbox prior to running this install and am getting this error.
38 error code ERESOLVE
39 error ERESOLVE unable to resolve dependency tree
40 error
41 error While resolving: "example"@"1.0.0"
41 error Found: mapbox-gl@"1.13.0"
41 error node_modules/mapbox-gl
41 error mapbox-gl@"^1.13.0" from the root project
41 error
41 error Could not resolve dependency:
41 error peer mapbox-gl@"^0.53.0" from vue-mapbox@"0.4.1"
41 error node_modules/vue-mapbox
41 error vue-mapbox@"*" from the root project
41 error
41 error Fix the upstream dependency conflict, or retry
41 error this command with --force, or --legacy-peer-deps
41 error to accept an incorrect (and potentially broken) dependency resolution.
41 error
41 error See /Users/user/.npm/eresolve-report.txt for a full report.
42 verbose exit 1
What's the right way to go about fixing this upstream dependency conflict?
It looks like it's a problem with peer dependencies in the latest version of npm (v7) which is still a beta version.
Try with npm install --legacy-peer-deps
. For detailed information check the blog post npm v7 Series - Beta Release! And: SemVer-Major Changes in npm v7.