Laravel uses Vite now, when you run npm run dev it is watching for changes to css and js files. I am new to Vite, but this is what I have noticed thus far.
Some details can be found here:
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Laravel is different, I don't know if it's an error or if I need to do something more than usual. Last time I used laravel it was 6 months ago and everything was normal.
The sequence of commands that I performed to start my project was the following:
1 - composer create-project --prefer-dist laravel/laravel versiculos
2 - composer require laravel/ui
3 - php artisan ui vue --auth
4 - npm install
5 - npm run dev
As soon as I run npm run dev what I get is already different from what I'm used to, see: https://prnt.sc/iLQMZe1xdR_4
and I notice that it creates a file called "hot" inside the public folder with this line: http://127.0.0.1:5173
if I call the "npm run watch" , I get the following error:
C:\xampp\htdocs\versiculos>npm run watch
npm ERR! Missing script: "watch"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\marqu\AppData\Local\npm-cache\_logs22-08-16T23_48_40_492Z-debug-0.log
This made me super confused because I'm a beginner in laravel, but I've always used it following the steps I informed and it always worked. Now it's different and I don't know what it is.
My node version is: 16.17.0
Can anyone guide me?
@mvnobrega First, please check that path. The js file is generated or not? If generated, then copy and rename it.
app.js
The second try is that reinstall Vue js and tries to load that.
And the last thing I noticed was that the component should be like this:
<example-component />
Not this:
<example-component></example-component>
This is not a big issue. If you still have confusion according to steps or something, try to create a new test project following this blog and check where your mistake is:
https://www.tutsmake.com/laravel-9-vue-js-crud-example-tutorial/
Please or to participate in this conversation.