Installing the nuxt3 version based on documentation fails due to 'Conflicting peer dependency'
See original GitHub issueDescribe the bug
When Installing the Nuxt3 version based on documentation it fails due to a ‘Conflicting peer dependency’. This happens on a clean npx nuxi init
logs
0 verbose cli [
0 verbose cli '/Users/***/.nvm/versions/node/v16.13.0/bin/node',
0 verbose cli '/Users/***/.nvm/versions/node/v16.13.0/bin/npm',
0 verbose cli 'i',
0 verbose cli '-D',
0 verbose cli '@vueuse/nuxt',
0 verbose cli '@vueuse/core'
0 verbose cli ]
1 info using npm@8.5.2
2 info using node@v16.13.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.31
npm ERR! node_modules/vue
npm ERR! peer vue@"3.2.31" from @nuxt/vite-builder@3.0.0-27494471.1091d45
npm ERR! node_modules/@nuxt/vite-builder
npm ERR! @nuxt/vite-builder@"npm:@nuxt/vite-builder-edge@3.0.0-27494471.1091d45" from nuxt3@3.0.0-27494471.1091d45
npm ERR! node_modules/nuxt3
npm ERR! dev nuxt3@"latest" from the root project
npm ERR! peer vue@"^3.2.25" from @vitejs/plugin-vue@2.3.1
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR! @vitejs/plugin-vue@"^2.3.1" from @nuxt/vite-builder@3.0.0-27494471.1091d45
npm ERR! node_modules/@nuxt/vite-builder
npm ERR! @nuxt/vite-builder@"npm:@nuxt/vite-builder-edge@3.0.0-27494471.1091d45" from nuxt3@3.0.0-27494471.1091d45
npm ERR! node_modules/nuxt3
npm ERR! dev nuxt3@"latest" from the root project
npm ERR! 4 more (@vue/server-renderer, @vueuse/head, nuxt3, vue-router)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @vueuse/core@"*" 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.4.9
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.1.0" from @vueuse/core@8.2.5
npm ERR! node_modules/@vueuse/core
npm ERR! dev @vueuse/core@"*" 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.
Extra notes and info
- Installing with yarn works fine
- upgrading to npm: v8.6.0, still the same issue
- I have this issue for a long time already and I’ve seen someone else report sort of the same issue https://github.com/vueuse/vueuse/issues/945 and he resolved it with
npm install @vueuse/core --legacy-peer-deps
which is ok and worked for now i guess… but i am curious what the real problem is and what the fix would be. So i dont have to install this with legacy-peer-deps everytime
Will add more info while debugging node/npm versions
Reproduction
EDIT: The reproduction does not show the actual issue Via stackblitz, I managed to install the packages just fine, therefor i have a feeling its related to npm 8 or my m1 system? https://stackblitz.com/edit/github-xt3wrx-nkwn61?file=package.json
System Info
System:
OS: macOS 12.2.1
CPU: (8) arm64 Apple M1 Pro
Memory: 142.92 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
npm: 8.5.2 - ~/.nvm/versions/node/v16.13.0/bin/npm
Browsers:
Edge: 99.0.1150.55
Safari: 15.3
"devDependencies": {
"nuxt3": "^3.0.0-27494471.1091d45"
}
### Used Package Manager
npm
### Validations
- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vueuse.org/guide).
- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Issue Analytics
- State:
- Created a year ago
- Reactions:12
- Comments:23
Top Results From Across the Web
[Fixed] NPM conflicting peer dependency error
Installing NPM modules using NPM version 7.11.1 npm ERR! code ERESOLVE npm ERR! ERESOLVE is unable to resolve the dependency tree npm ERR!...
Read more >node.js - npm install fails with Conflicting peer dependency
I have changed node-sass version to be compatible with my node version and this error went away. and the build is successful. Share....
Read more >FAQ | Vuexy - Pixinvent
Causes of npm install or yarn install issue can be due to various things which include: Missing or inappropriate dependencies like node or...
Read more >Slice Simulator Nuxt 3 - Developing with Prismic
Hello, I am trying to setup with Prismic 3 and Nuxt 3 version, ... Conflicting peer dependency: vue@2.6.14 npm ERR! node_modules/vue npm ...
Read more >vee-validate - npm
Form Validation for Vue.js. Latest version: 4.7.3, last published: a month ago. Start using vee-validate in your project by running `npm i ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue here. Can’t install it with Nuxt 3.
Node v18.1.0 NPM v8.10.0
The same for me. I tried on a clean project of nuxt v3.0.0-rc1 The complete log:
I only managed to install it by
npm i --legacy-peer-deps
.