Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to chokidar 3 to support the Node v14 release #2528

Closed
dandv opened this issue Apr 21, 2020 · 19 comments
Closed

Upgrade to chokidar 3 to support the Node v14 release #2528

dandv opened this issue Apr 21, 2020 · 19 comments

Comments

@dandv
Copy link

dandv commented Apr 21, 2020

Saw this warning while installing a Gatsby project:

warning gatsby > webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

Indeed, our package.json depends on chokidar 2.

@hiroppy
Copy link
Member

hiroppy commented Apr 21, 2020

Sorry but we can't upgrade Chokidar to v3 because this library doesn't support Node6 but webpack-dev-server needs to support Node6. Please wait for releasing webpack-dev-server@next.

@hiroppy hiroppy closed this as completed Apr 21, 2020
@paulmillr
Copy link

paulmillr commented Apr 22, 2020

You should release webpack 5 with node 8+ / chokidar 3 support and make "webpack-dev-server-next" webpack 6. It really IS a big deal. It's a security issue. See webpack/watchpack#130

@alexander-akait
Copy link
Member

@paulmillr You should not tell us how to make a release roadmap. In the near future we will remove chokidar in favor better alternative

@hiroppy I would rather refuse chokidar, in favor native or https://github.com/facebook/watchman

But after testing the native support, I did not find any problems with native fs washing with the latest LTS versions of the node.

Besides problems, it brings bad supporting + lead developer abusive behavior + only bla-bla-bla, "it will freeze", "it will slow down", "it will not work" without any real examples, reproducible test repos or just code examples, also I would like to raise an issue on npm about security problems, because @paulmillr say that they do not have access for AWS from previous versions 😕

It all sounds just awful. I have no words.

@hiroppy
Copy link
Member

hiroppy commented Apr 22, 2020

Yes, watchman is cool but many options don't support this library, too sad.

https://facebook.github.io/watchman/docs/nodejs/

@dandv
Copy link
Author

dandv commented Apr 23, 2020

I know very little about this, but I've just noticed that the Linux binary for watchman is bigger than some Linux distros.

@alexander-akait
Copy link
Member

@dandv native fs works fine, we should consider migration, no more compilation and platform dependent libraries, also this will give a huge set of feedback and potentially we can improve native fs watching on node.js side, because in our long-term we must get rid of unnecessary dependencies in favor of abilities node.js platform

@tmm1
Copy link

tmm1 commented May 7, 2020

On node 14.2.0, I'm noticing that webpack --watch will now consume 180-200% CPU constantly. Presumably this is because of the chokidar v2 incompatibility.

Screen Shot 2020-05-07 at 2 19 08 PM

@tmm1
Copy link

tmm1 commented May 7, 2020

Presumably this is because of the chokidar v2 incompatibility.

I can confirm this was the case. I used yarn and added the following to my package.json:

  "resolutions": {
    "chokidar": "^3.4.0"
  }

and now CPU usage is back to normal.

@sibelius
Copy link

node 12 is the LTS now

we should deprecate node 6 to seek performance gains

@SomethingNew71
Copy link

SomethingNew71 commented Jun 24, 2020

Yeah, I am not sure why Node 6 should even be a consideration....

It's not even remotely supported at this point.

schedule

@alexander-akait
Copy link
Member

We are working on v4, a lot of changes, nobody want to help, but we are open source project

@paulmillr
Copy link

@evilebottnawi that's not "a lot of changes". You bump to v5 and release with new chokidar. That's it. Takes five minutes.

@alexander-akait
Copy link
Member

@paulmillr nope

@sibelius
Copy link

can you accept a PR to fix this?

@dandv
Copy link
Author

dandv commented Jun 24, 2020

Should this issue be Closed? Does that mean we should create a new one?

@alexander-akait
Copy link
Member

It is fixed in v4, release is soon

@toresbe
Copy link

toresbe commented Nov 25, 2020

I know very little about this, but I've just noticed that the Linux binary for watchman is bigger than some Linux distros.

For what it's worth: This was all debug symbols accidentally included by the CI. As indicated by the link, that issue is resolved and the binary is now 2.5 MB. I am looking forward to the v4 release, whether that's a chokidar bump or a switch to watchman :)

@mmunte-impeo
Copy link

@alexander-akait so many dependent software is not able to properly work on nodejs 15 because you do not release an updated version with chokidar 3.

It was june when you wrote version 4 would be released soon.

Sure it is open source, but still I agree with other saying it is such a simple fix. Those using yarn can bypass the problem using resolutions. But those using npm - no luck.

Nodejs 15 will support Apple Silicone. There is no official build yet, but it compiles fine from sources. But then using the webpack-dev-server will, as others wrote, consume 120% cpu constantly.

Hope you can reconsider.

@alexander-akait
Copy link
Member

We do release webpack-dev-server4-beta.0 with latest chokidar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants