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.

npm run watch not working

See original GitHub issue
  • Laravel Mix Version: 0.8.7
  • Node Version (v6.9.5):
  • NPM Version (4.3.0):
  • OS: Ubuntu 16.04

Description:

After running npm run watch or npm run watch-poll I get the message: DONE Compiled successfully in 11019ms. Next, I change js or css files, but recompiling is not happening. But npm run dev or npm run production are working fine. What’s wrong?

webpack.mix.js:

const { mix } = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
   .js('resources/assets/js/pages.js', 'public/js')
   .js('resources/assets/js/srext.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css')
   .combine([
       'resources/library/**/css/*.css'
   ], 'public/css/all.css')
   .js('resources/library/ext/js/notjs.js', 'public/js/all.js')
   .version();

Steps To Reproduce:

npm run watch or npm run watch-poll

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15

github_iconTop GitHub Comments

43reactions
thibaultvanccommented, Nov 4, 2017

sudo sysctl fs.inotify.max_user_watches=900000000

34reactions
CabdirisaaQcommented, Feb 28, 2017

Guys, JeffreyWay linked helped alot. this is my previouse script object in packages.json

` “watch”: “cross-env NODE_ENV=development webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js”,

change that to the following

"watch": "cross-env NODE_ENV=development webpack --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",

if you notice I’ve added " --watch-poll " after --watch

Read more comments on GitHub >

github_iconTop Results From Across the Web

"npm run watch" not working and returning error's saying ...
In my fresh laravel project after adding a tailwind template, I tried running npm run watch but it's not working, thus the template...
Read more >
npm run watch does not work · Issue #2861 · laravel-mix ...
I cannot run npm run watch . I have written all scripts and config file webpack.mix.js . I want to use laravel-mix with...
Read more >
[5.4] npm run watch not working - Laracasts
Using 5.4 and mix, when I run npm run watch it compiles once and looks like it is waiting for changes, but when...
Read more >
npm run watch makes no changes. - Bagisto Forum
Make sure that you have installed all npm dependencies properly, so if not installed then run 'npm install' at root of your package...
Read more >
npm run dev Is Not Working In Laravel 8 - Error Fixed - YouTube
You will fix your error InchaeAllah in four steps, don't worry Music:https://www.youtube.com/ watch ?v=AOeY-nDp7hI&t=0s.
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