Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`npm run watch` not working in Laravel 5.4

Using Laravel 5.4 and Mix, when I run npm run watch it compiles everything once and looks like it is waiting for changes, but when I make changes to any of my asset files it doesn't seem to detect anything. Is anyone else having this issue in 5.4 or have a solution?

like image 671
Josh Mountain Avatar asked Jan 26 '17 04:01

Josh Mountain


1 Answers

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

like image 70
Josh Mountain Avatar answered Oct 10 '22 23:10

Josh Mountain