-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
npm error when installing pinia #853
Comments
Using Edit: Apparently, this is okay from npm perspective and they expect users to use overrides to pin the vue version |
@posva I used Running |
Well, the hope would be that this gets fixed in npm in the not too distant future ... |
Same on Mac (MacBook Pro (13-inch, M1, 2020), macOS Monterey)
|
This comment has been minimized.
This comment has been minimized.
Using the latest node, npm and Vue cli version doesn't solve the issue. But when moving to Vite by setting up the project via |
This comment was marked as spam.
This comment was marked as spam.
getting the same error on a fresh nuxt 3 installation. tried all the workarounds above to no avail |
seems to work now. |
As @andrei-gheorghiu commented using |
Same issue here:
Imo this asks for a package for vue3 only. Pinia 2.0 for Vue 2 Makes more sense to avoid these issues imo! |
As an update tho if you specifically mention that you want to use Vue 3 in your dependencies, it all installs without issues:
|
If using nuxt3, we still need to install Vue3 in order to get Pinia to successfully install? |
This comment was marked as spam.
This comment was marked as spam.
Workaround for vuejs/pinia#853
Workaround for vuejs/pinia#853
Workaround for vuejs/pinia#853
Confirming had the same issue with nuxt@3.0.0-rc-6 with only tailwind and headless as dep. Install of pinia failed due to vue@2.6.14 peer dependency. |
Hello, I applied the following changes (as inidcated by @posva earlier in the discussion):
|
I can confirm that |
I followed the instructions, and had the same issue, npm did not want to install pinia because of the version conflict. https://pinia.vuejs.org/ssr/nuxt.html#installation It's just frustrating when you follow instructions and it doesn't work as expected :( |
yes, this works as well, but it makes your app less portable - you need to tell everyone to use after including or it doesn't work for you now? something may change as new versions of npm packages come out... |
@AloisSeckar Sorry, I was a bit too fast with my comment and had to read the whole story above first... :/ It works with the override, but I think for new users, coming with Nuxt 3 for example and add Pinia, we should place a comment in the documentation to help them going forward, and not search for this issue here... What do you think? |
Because people keep running into vuejs#853 I'd suggest to include the troubleshoting directly inside the docs
Not bad idea at all. Since pinia docs allow quick change suggestions via GitHub, you inspired me to propose one: #1901 |
@AloisSeckar cool thanks! |
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> Close #853
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
I just delete package-lock.json and then ran |
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
--legacy-peer-deps was required as a workaround for vuejs/pinia#853, but it is now resolved on my end.
"overrides": { add this to package.json |
That solves the issue and is also documented on pinia: https://pinia.vuejs.org/ssr/nuxt.html as a "Tip" |
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> Close vuejs/pinia#853
Hi, I'm getting above error with setting |
I believe this is because some other dependency pins You can try |
I just implemented the override workaround. Isn't the real problem here however, how pinia is referencing packages and vue versions? Shouldn't that be resolved? |
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> Close vuejs/pinia#853
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> Close vuejs/pinia#853
This issue might be a duplicate of #724
I'm trying to install Pinia via npm but get a
error.
Reproduction
The project setup on Win10:
I created a temporary repository showing the inial commit after creating the project with the Vue CLI
https://github.com/matthiashermsen/temp-pinia
Steps to reproduce the behavior
npm install
npm install pinia
Expected behavior
It should install the package without errors.
Actual behavior
This is the terminal error on Win10
and this is the npm log file
Additional information
Based on #724 (comment) I think it points to the correct url ( https://registry.npmjs.org/pinia )
Based on #727 (comment) I think there is no
@vue/compositon-api
package installed. I testednpm remove @vue/composition-api
too.The text was updated successfully, but these errors were encountered: