unplugin / unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup
MIT License
3.29k stars 198 forks source link

npm i -D unplugin-auto-import ERROR on quasar project (not Vite) #73

Closed robMolloy closed 3 years ago

robMolloy commented 3 years ago

I'm getting thew following error after creating a new quasar project with

quasar create quasar-sandbox

Am i doing something wrong?

npm i -D unplugin-auto-import gives the following error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: quasar-sandbox-2@0.0.1
npm ERR! Found: vue@3.2.20
npm ERR! node_modules/vue
npm ERR!   vue@"3.2.20" from @quasar/app@3.1.8
npm ERR!   node_modules/@quasar/app
npm ERR!     dev @quasar/app@"^3.0.0" from the root project
npm ERR!   peer vue@"3.2.20" from @vue/server-renderer@3.2.20
npm ERR!   node_modules/@vue/server-renderer
npm ERR!     @vue/server-renderer@"3.2.20" from vue@3.2.20
npm ERR!   3 more (vue-i18n, vue-router, vuex)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev unplugin-auto-import@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: vue@2.6.14
npm ERR! node_modules/vue
npm ERR!   peer vue@">= 2.5 < 3" from @vue/composition-api@1.3.0
npm ERR!   node_modules/@vue/composition-api
npm ERR!     peerOptional @vue/composition-api@"^1.1.0" from @vueuse/core@6.7.4
npm ERR!     node_modules/@vueuse/core
npm ERR!       peerOptional @vueuse/core@"^6.0.0" from unplugin-auto-import@0.4.13
npm ERR!       node_modules/unplugin-auto-import
npm ERR!         dev unplugin-auto-import@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/imp_r.molloy/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/imp_r.molloy/.npm/_logs/2021-10-31T19_28_30_197Z-debug.log
robMolloy commented 3 years ago

Just a nudge in case this got missed.

antfu commented 3 years ago

We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.

therealcoder1337 commented 2 years ago

for anyone wondering: it seems this is caused by a missing vue dependency in package.json of a quasar project. apparently it has to be specified explicitly. i generated a new quasar project and that was a difference i noticed after the error went away, though i cannot say for sure it's the only cause.