Upgrading Vue.js project to latest version of Vue?

I’m surely doing something wrong as I try to become familiar with Vue and Ionic. When trying to install Pinia, I receive an error that Pinia needs Vue 3.3.6 and my project is using 3.3.4. The project was created with the Ionic CLI.

How can I upgrade a Vue.js app that was created with the Ionic CLI to the latest available version of Vue?

Thank you in advance. I really appreciate any help anyone can provide.

You shouldn’t be getting that error. Pinia supports both Vue 2 and 3. I just migrated to Pinia from Vuex and I am running Vue 3.3.4 :grinning:

Either way, you should just be able to run npm update to update all your packages to the latest minor versions.

Maybe I’m misunderstanding the output errors. Here is what I’m getting after trying to install Pinia:

vue_display_try % sudo npm install pinia
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vue_display_try@0.0.1
npm ERR! Found: vue@3.3.4
npm ERR! node_modules/vue
npm ERR! peer vue@“^3.2.25” from @vitejs/plugin-vue@4.4.0
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR! dev @vitejs/plugin-vue@“^4.0.0” from the root project
npm ERR! peer vue@“3.3.4” from @vue/server-renderer@3.3.4
npm ERR! node_modules/@vue/server-renderer
npm ERR! peerOptional @vue/server-renderer@“^3.0.1” from @vue/test-utils@2.4.1
npm ERR! node_modules/@vue/test-utils
npm ERR! dev @vue/test-utils@“^2.3.0” from the root project
npm ERR! @vue/server-renderer@“3.3.4” from vue@3.3.4
npm ERR! 3 more (@vue/test-utils, vue-router, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! pinia@“" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@3.3.6
npm ERR! node_modules/vue
npm ERR! peer vue@“>= 2.5 < 2.7” from @vue/composition-api@1.7.2
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@“^1.4.0” from pinia@2.1.7
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.

It looks like you are maybe trying to install @vue/composition-api in addition to pinia? @vue/composition-api is only needed if you are running Vue <2.7 (source).

To install Pinia, all you need is npm install pinia.