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.

Watch Fails on versions > 1.6.1

See original GitHub issue

Hi,

I recently discovered my webpack watch had stopped working after reinstalling node modules. After a lot of digging i pinned the issue down to this package. Basically when i use any other version of this package > 1.6.1 the watcher does not keep the process alive anymore. There is no error in the console but the process.on('exit', handler fires.

I am using webpacks node api as follows:

var compiler = webpack(params);

  if (watch) {
    compiler.watch({
      ignored: /node_modules/
    }, onBuildComplete);
  }
  else {
    compiler.run(onBuildComplete)
  }

I thought it was only me but many of my team mates are experiencing the same thing.

We are watching quite a lot of files (> 800) which might be a contributing factor.

node: 10.21.0 npm: 6.1.0 webpack: 4.43.0 Windows 10 Enterprise

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-akaitcommented, Jul 2, 2020

@kane-mason It’s great that we caught this problem. I think we should leave it open to other developers. This is one of many reasons why we want to migrate from chokidar to native watch.

Native performance and and compatibility issues must be addressed to node side. In long term developers should use native modules without any additional layers. Just my opinion.

0reactions
kane-masoncommented, Jul 2, 2020

Ok i figured it out.

To cut a very long story short, we had an unmaintaned dependency gulp-xml2json which through a series of requires resulted in an old version of graceful-fs being required. This version 2.0.3 monkey patches the native fs module, and the ‘new’ readdir does not take into account the second options parameter which resulted in the callback being confused for this parameter, and never being called. Hence the watch actually never starts.

image image

So in summary, this project or more specifically chokidar, will run into silent annoying problems, if graceful-fs <= 2.0.3 is required anywhere else in your project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · webpack/watchpack
Webpack watch stops if one of the output files is busy ... Does not work/tests fail on OpenBSD ... Watch Fails on versions...
Read more >
Minecraft: 1.6.1 Update - YouTube
With no snapshot this week i thought id cover some feature added in the minecraft 1.6.1 update and also something i missed from...
Read more >
G-Watch App
This page is dedicated to G-Watch application for Samsung smart watch. ... G-Watch App hotfix version 2.1.1 is rolling out! ... Watchface version:...
Read more >
Amazon Interactive Video Service Release Notes
Fixed a bug where autoplaying in desktop Safari sometimes failed. The Web SDK getVersion function no longer appends a hash to the player...
Read more >
CoffeeScript
The command-line version of coffee is available as a Node.js utility, ... coffee --watch --compile experimental.coffee; Concatenate a list of files into a ......
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