Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confilcts with @nuxt/test-utils and Nuxt3 #928

Open
Chocopieca opened this issue Aug 29, 2024 · 3 comments
Open

Confilcts with @nuxt/test-utils and Nuxt3 #928

Chocopieca opened this issue Aug 29, 2024 · 3 comments
Labels
bug Something isn't working pending triage

Comments

@Chocopieca
Copy link

Environment

  • Operating System: Windows_NT
  • Node Version: v21.7.3
  • Nuxt Version: ^3.11.2
  • CLI Version: 3.13.1
  • Nitro Version: -
  • Package Manager: npm
  • Builder: - vite
  • User Config: compatibilityDate, devtools, modules, i18n
  • Runtime Modules: @pinia/nuxt@^0.5.1, @nuxt/test-utils/module@^3.13.1, @nuxt/devtools@^1.3.1, @nuxtjs/robots@^3.0.0, @nuxtjs/tailwindcss@^6.12.0, @nuxtjs/eslint-module@^4.1.0, @nuxtjs/i18n@^8.3.1, @vite-pwa/nuxt@^0.7.0, nuxt-clarity-analytics@^0.0.6, @nuxt/image@^1.7.0
  • Build Modules: -

Reproduction

Here is reproduce, just try to install dependances.
@nuxt-test-utils-dependaces-error.zip

Describe the bug

npm i catch npm ERR! ERESOLVE could not resolve

Additional context

I reinstalled dependancy and caught error.

Logs

PS C:\reproduce\nuxt-autocomplit-type-error> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: nuxt-app@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   peer vue@"^3.3.4" from @nuxt/[email protected]
npm ERR!   node_modules/@nuxt/test-utils
npm ERR!     dev @nuxt/test-utils@"^3.13.1" from the root project
npm ERR!   peer vue@"^3.2.0" from [email protected]
npm ERR!   node_modules/vue-router
npm ERR!     vue-router@"^4.3.2" from the root project
npm ERR!     peer vue-router@"^4.0.0" from @nuxt/[email protected]
npm ERR!     node_modules/@nuxt/test-utils
npm ERR!       dev @nuxt/test-utils@"^3.13.1" from the root project
npm ERR!     1 more (@nuxtjs/i18n)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @pinia/testing@"^0.1.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vue
npm ERR!   peer vue@">= 2.5 < 2.7" from @vue/[email protected]
npm ERR!   node_modules/@vue/composition-api
npm ERR!     peerOptional @vue/composition-api@"^1.4.0" from [email protected]
npm ERR!     node_modules/pinia
npm ERR!       pinia@"^2.1.7" from the root project
npm ERR!       1 more (@pinia/testing)
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!
npm ERR! For a full report see:
npm ERR! C:\Users\AppData\Local\npm-cache\_logs\2024-08-29T22_11_47_097Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\AppData\Local\npm-cache\_logs\2024-08-29T22_11_47_097Z-debug-0.log
Copy link

dosubot bot commented Aug 29, 2024

Hey @Chocopieca! 👋 I'm here to help you with any issues you're facing. I'm a bot that can assist with bug fixes, answer questions, and guide you on how to become a contributor. Let's tackle this challenge together!

I found some similar issues and discussions that might be relevant to your problem:

  1. Pinia installation error [1]
  2. Error with install nuxt [2]
  3. Nuxt install fails with nuxt/kit error [3]

To resolve the ERESOLVE dependency conflict when installing @nuxt/test-utils with Nuxt3, you can use the --legacy-peer-deps flag with your package manager. This flag tells the package manager to ignore peer dependency conflicts and proceed with the installation.

Here is the command you can use with npm:

npm install @nuxt/test-utils --legacy-peer-deps

If you are using yarn, you can use:

yarn add @nuxt/test-utils --ignore-engines

For pnpm, you can use:

pnpm add @nuxt/test-utils --legacy-peer-deps

This should help you bypass the dependency conflict and install @nuxt/test-utils successfully [4].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the bug Something isn't working label Aug 29, 2024
@Chocopieca
Copy link
Author

npm install @nuxt/test-utils --legacy-peer-deps
Helped me

@halws
Copy link

halws commented Sep 5, 2024

hi guys, any plans to bump dependencies to resolve this? 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage
Projects
None yet
Development

No branches or pull requests

2 participants