Closed ericwang401 closed 2 years ago
I added a pull request to add documentation for this behavior in https://github.com/laravel/vite-plugin/pull/16
I'm not able to replicate this on Fedora 36 (and I don't have a custom sysctl.conf
), but I have run into similar inotify issues in the past with Mix on large projects.
I'm wondering whether we can make this less silent so people have something to search for if it happens.
I'm not able to replicate this on Fedora 36 (and I don't have a custom
sysctl.conf
), but I have run into similar inotify issues in the past with Mix on large projects.I'm wondering whether we can make this less silent so people have something to search for if it happens.
Oh okay! Is there also a separate package for these directives to work?
@viteReactRefresh
@vite('resources/js/app.jsx')
I don't think Laravel is converting these directives to HTML when I went to the page with those directives. I'm also using Docker (in the repo), and I'm not sure if that conflicts as well.
Those are part of this framework PR https://github.com/laravel/framework/pull/42785 that we'll be merging and releasing soon.
You can test it out now by running composer require laravel/framework:"dev-vite as 9.11"
. You may need to php artisan view:clear
if you've already tried to use the directives in your project.
The Vite integration isn't officially launched yet. We needed to publish the plugin early to test all the various starter kits and stacks.
Hi @ericwang401,
public/hot
file.I've verified this by using the command you mentioned above to set the watchers to 5
so that it always fails.
Hi @ericwang401,
17 should improve the exit and signal handling so that uncaught exceptions (including your file watcher issue) are output to the console, while still cleaning the
public/hot
file.I've verified this by using the command you mentioned above to set the watchers to
5
so that it always fails.
Hey, thank you for the update! I will create a new issue if a problem like this happens again in the future.
Thanks again!
Description:
When running the Vite dev server using
npm run dev
, the development server starts up withBut closes unexpectedly a second after running the command with no messages or error messages whatsoever.
I did some debugging and commented out
process.exit();
inand this finally made the dev server spit out the following error
A fix for users that use this package on Linux is running this command
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
It will automatically adjust the system watcher limit and make the changes live.Steps To Reproduce:
I am using
Ubuntu 20.04.4 server LTS x86_64
andDocker version 20.10.16, build aa7e414
with Docker compose v2https://github.com/ericwang401/testing-laravel-vite
docker compose up -d
docker compose exec workspace bash
composer i && npm i
npm run dev
(make sure you went into node_modules and commented outprocess.exit
in the Laravel Vite plugin cleanup function)