Closed mlsjla closed 2 years ago
We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.
Not sure if this will help others:
I got a similar error when installing unplugin-auto-import
after already had installed other packages:
npx nuxi init nuxt-app
cd nuxt-app
npm i
npm i -D unplugin-auto-import
output:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: vue@3.2.37
npm ERR! node_modules/vue
npm ERR! peer vue@"^3.2.37" from @nuxt/vite-builder@3.0.0-rc.4
npm ERR! node_modules/@nuxt/vite-builder
npm ERR! @nuxt/vite-builder@"^3.0.0-rc.4" from nuxt@3.0.0-rc.4
npm ERR! node_modules/nuxt
npm ERR! dev nuxt@"3.0.0-rc.4" from the root project
npm ERR! peer vue@"^3.2.25" from @vitejs/plugin-vue@2.3.3
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR! @vitejs/plugin-vue@"^2.3.3" from @nuxt/vite-builder@3.0.0-rc.4
npm ERR! node_modules/@nuxt/vite-builder
npm ERR! @nuxt/vite-builder@"^3.0.0-rc.4" from nuxt@3.0.0-rc.4
npm ERR! node_modules/nuxt
npm ERR! dev nuxt@"3.0.0-rc.4" from the root project
npm ERR! 4 more (@vue/server-renderer, @vueuse/head, nuxt, vue-router)
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.6.3
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.1.0" from @vueuse/core@8.7.5
npm ERR! node_modules/@vueuse/core
npm ERR! peerOptional @vueuse/core@"*" from unplugin-auto-import@0.9.2
npm ERR! node_modules/unplugin-auto-import
npm ERR! dev unplugin-auto-import@"*" from the root project
*I don't see the error if I run install like so:
npx nuxi init nuxt-app
cd nuxt-app
npm i -D unplugin-auto-import
output:
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
added 614 packages, and audited 615 packages in 7s
81 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Node: v16.15.1 NPM: 8.11.0
In my project I got conflicts with other packages, could be we have not configured dependencies correctly (in case I get more info on this will share). We are trying to test composables with autoimports (vitest)
"@nuxt/test-utils-edge": "^3.0.0-rc.4-27588443.cf25525",
"@testing-library/vue": "^6.6.0",
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: vue@3.2.37
npm ERR! node_modules/vue
npm ERR! peer vue@"^3.2.37" from @nuxt/test-utils-edge@3.0.0-rc.4-27609974.fe508f5
npm ERR! node_modules/@nuxt/test-utils-edge
npm ERR! dev @nuxt/test-utils-edge@"^3.0.0-rc.4-27588443.cf25525" from the root project
npm ERR! peer vue@">= 3" from @testing-library/vue@6.6.0
npm ERR! node_modules/@testing-library/vue
npm ERR! dev @testing-library/vue@"^6.6.0" from the root project
npm ERR! 1 more (nuxt)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev unplugin-auto-import@"^0.9.2" 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.6.3
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.1.0" from @vueuse/core@8.7.5
npm ERR! node_modules/@vueuse/core
npm ERR! peerOptional @vueuse/core@"*" from unplugin-auto-import@0.9.2
npm ERR! node_modules/unplugin-auto-import
npm ERR! dev unplugin-auto-import@"^0.9.2" 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.