'Inertia Vue components not updating until relaunch Laravel Sail
I have created a freesh Laravel 9 project with Sail, installed jetstream and inertia, but if I try to create a new Vue file, it is not updated until I stop Sail and start it again.
Here are the steps
// create Laravel project
curl -s https://laravel.build/example-app | bash
// start sail
sail up
// install Laravel jetstream
sail composer require laravel/jetstream
// install inertia
sail php artisan jetstream:install inertia
sail npm install sail npm run dev
sail php artisan migrate
// create a Vue component in Pages/Guests/Guest.vue
// create a test route in web.php
Route::get('/test', function () {
return Inertia::render('Guests/Guest');
});
If I try to do this, sail npm run dev, and refresh the browser, I have a blank page, and a message in the console "Uncaught (in promise) Error: Cannot find module './Guests/Guest.vue'"
thanks so much
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
