Why is the install of pinia failing via npm? (Nuxt 3) #2089
-
I'm not doing anything fancy. Just trying to get Pinia up and running in my basic Nuxt 3 project by installing it via NPM. Is this an bug/issue or am I missing something? npm install pinia @pinia/nuxt
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: vue@3.2.47
npm ERR! node_modules/vue
npm ERR! peer vue@">=3" from @iconify/vue@4.1.0
npm ERR! node_modules/@iconify/vue
npm ERR! @iconify/vue@"^4.1.0" from nuxt-icon@0.3.3
npm ERR! node_modules/nuxt-icon
npm ERR! dev nuxt-icon@"^0.3.3" from the root project
npm ERR! peer vue@"^3.2.47" from @nuxt/vite-builder@3.3.1
npm ERR! node_modules/@nuxt/vite-builder
npm ERR! @nuxt/vite-builder@"3.3.1" from nuxt@3.3.1
npm ERR! node_modules/nuxt
npm ERR! dev nuxt@"^3.3.1" from the root project
npm ERR! 8 more (@unhead/vue, @vitejs/plugin-vue, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! pinia@"*" 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 < 2.7" from @vue/composition-api@1.7.1
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.4.0" from pinia@2.0.33
npm ERR! node_modules/pinia
npm ERR! pinia@"*" 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!
npm ERR! For a full report see:
npm ERR! C:\Users\ryanr\AppData\Local\npm-cache\_logs\2023-03-20T20_57_02_918Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ryanr\AppData\Local\npm-cache\_logs\2023-03-20T20_57_02_918Z-debug-0.log I tried installing My {
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxtjs/color-mode": "^3.2.0",
"@nuxtjs/supabase": "^0.3.1",
"@nuxtjs/tailwindcss": "^6.6.0",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"chalk": "^5.2.0",
"eslint": "^8.36.0",
"nuxt": "^3.3.1",
"nuxt-icon": "^0.3.3"
},
"dependencies": {
"@pinia/nuxt": "^0.4.7",
"@supabase/supabase-js": "^2.11.0",
"daisyui": "^2.51.4",
"superjson": "^1.12.2",
"zod": "^3.21.4"
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Apologies, I thought I had searched for an answer. I see #2009 describes similar issue, however, their solution does not seem to work for me for some reason. |
Beta Was this translation helpful? Give feedback.
-
Wow, okay... so if I install it with Yarn it works. I guess the answer is "use yarn".
|
Beta Was this translation helpful? Give feedback.
Wow, okay... so if I install it with Yarn it works. I guess the answer is "use yarn".
yarn add pinia @pinia/nuxt