laravel-mix scripts and files changes not watched
See original GitHub issue- Laravel Mix Version : 0.8.4
- Node Version (
node -v
) : 7.6.0 - NPM Version (
npm -v
) : 4.2.0 - OS: MacOS Sierra 10.12.3
Description:
I only use laravel-mix to copy, concat, minify and version my assets and everything is working fine when I launch commands like npm run dev
or npm run production
.
I use the mix.copy
, mix.sass
, mix.scripts
and mix.version
(only for production) features of laravel-mix.
When I used the watch feature with elixir, sass changes, scripts sheet changes and file changes were detected and triggered a task execution. With laravel-mix, sass sheets changes are well detected but scripts sheets changes are not and neither files ones.
Is this a normal behaviour and is there a way to track scripts sheets changes and files changes ?
Steps To Reproduce:
npm run watch
or
npm run watch-poll
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (1 by maintainers)
Top Results From Across the Web
Laravel mix scripts not watching changes - Stack Overflow
I'm currently using the commands below and it works fine and compiles all the expected files when I run npm run watch ,...
Read more >laravel-mix scripts and files changes not watched · Issue #455
When I used the watch feature with elixir, sass changes, scripts sheet changes and file changes were detected and triggered a task execution....
Read more >npm run watch not actually watching files - Laracasts
Problem solved. It was not really a problem. When you are watching mix.scripts(), they do not show anything in console, so it's actually...
Read more >Laravel Mix has stopped watching my code for changes
For some reason, only on one of my computers, Laravel Mix's watch and watch-poll commands aren't detecting changes.
Read more >Frequently Asked Questions | Laravel Mix Documentation
I'm using a VM, and webpack isn't picking up my file changes. ... update your NPM script to use the --watch-poll flag, in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to add my two cents, in case someone stumble upon this issue and can’t resolve it even with the newest laravel-mix, webpack, node and npm. Spent the whole day banging my head, and FINALLY:
https://webpack.github.io/docs/troubleshooting.html#file-saves-in-webstorm-don-t-trigger-the-watcher
Please note: there’s no output in the console, but it works - check your resulting files.
it works for me after :
sudo sysctl fs.inotify.max_user_watches=32768
in the console Hope it’s help