f / vue-wait

Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications
MIT License
2k stars 101 forks source link

NPM v7 could not resolve peer dependency for vue 3 #110

Open dspinov opened 3 years ago

dspinov commented 3 years ago

Step to reproduce

Using NPM v7 to install vue-wait v1.5.2 we have an error message about the unresolved dependency tree.

Expected Behavior

It should be worked without any error or warning.

Actual Behavior

There is an error from npm about the unresolved dependency tree:

npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.16" from vue-wait@1.5.2
npm ERR! node_modules/vue-wait
npm ERR!   vue-wait@"*" from the root project

Environment

vue: 3.2.4
vue-wait: 1.5.2

Suggested solution

Add dependency range into the peer dependencies:

"peerDependencies": {
  "vue": ""^2.5.16 || ^3.0.0",
}
mesa4 commented 2 years ago

@dspinov Hello, there is one known solution (it helps for me)

try this command in your terminal

npm i vue-wait --legacy-peer-deps

also there is a topic about flag --legacy-peer-deps https://stackoverflow.com/questions/66020820/npm-when-to-use-force-and-legacy-peer-deps

galaxyblur commented 1 year ago

The above solution does not work for me. For every package I install that requires vue >= 3, I have to use the --legacy-peer-deps flag. The right solution is what was originally posted: if this library is truly compatible with Vue 3, then changing peerDependencies as described should not be a problem.