`npm run watch` not working in Laravel 5.4
npm run watch-poll
watch-poll
periodically checks (polls) for changes e.g. every 1000ms it will manually check to see if any files have changed.
what laravel
docs say?
You may find that in certain environments Webpack isn't updating when your files change. If this is the case on your system, consider using the watch-poll command. You can read up on the docs for a more information about mix.
npm run watch-poll
It's working on ubuntu as well And auto compiling on code changes. Thank you.
The solution was provided by Jeffrey Way over at Laracasts.
Try adding the --watch-poll flag to your package.json
script. Or just try:
node_modules/.bin/webpack --watch --watch-poll --config=node_modules/laravel-mix/setup/webpack.config.js