Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BernardoBF4's avatar

Update Vue 2 to Vue 3 with Vite

I'm working on Vue 2.7 and Vite 3.2.5 with Laravel 10, and I'd like to update Vue to the latest version. I've tried starting with a simple npm i vue@latest and it did installed the latest version, but all the dependencies started to collapse. I ended up usin --force to update some dependencies and remove others, such as @vitejs/plugin-vue2, but I don't feel like using --force is a nice thing to do. All this updating almost worked, except for an error, which is happening because I am importing a type inside a Vue component: the error is cannot read properties of undefined (reading 'sys') (I'm am using Composition API and Typescript) for a piece of code like this:

import { Props } from './Props'
const props = defineProps<Props>()

I have searched a bit and I found that I might have to install Typescript as a dependency.

Anyway, if any of you know of some tutorial to update from Vue 2 to Vue 3, using Vite and Laravel, I am very thankful if you share it with me.

0 likes
0 replies

Please or to participate in this conversation.