question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
sburinacommented, Mar 30, 2017

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

When using the JetBrains WebStorm IDE, you may find that saving changed files does not trigger the watcher as you might expect. Try disabling the safe write option in the settings, which determines whether files are saved to a temporary location first before the originals are overwritten: uncheck File > Settings… > System Settings > Use “safe write” (save changes to a temporary file first)

Please note: there’s no output in the console, but it works - check your resulting files.

10reactions
thibaultvanccommented, Oct 23, 2017

it works for me after : sudo sysctl fs.inotify.max_user_watches=32768 in the console Hope it’s help

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found