Upgrade watchpack for node 14 compatibility
See original GitHub issueWith node v13’s EOL looming, I’m trying to get a repo upgraded to v14, but webpack is currently incompatible:
- webpack 4.43.0 requires watchpack^1.6.1
- watchpack <1.7 requires chokidar^2.1.8
- chokidar ❤️ requires fsevents^1.2.7
- fsevents <2 does not support node v14
webpack/watchpack#153 added support for chokidar3, so I imagine the fix is as simple as updating the watchpack dependency in package.json, but I don’t know what the knock-on effects might be. If that’s sufficient, I’ll happily submit a PR 🙂
What is the current behavior?
Installing webpack on node 14.x causes deprecated/notsup warnings.
If the current behavior is a bug, please provide the steps to reproduce.
$ node -v
v14.1.0
$ npm -v
6.14.4
$ npm init -y
[snip (full output below)]
$ npm install webpack
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[snip]
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"14.1.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
[snip]
What is the expected behavior?
npm install watchpack succeeds without warnings
Other relevant information: webpack version: 4.43.0 Node.js version: 14.1.0 (I’ve also seen it on 14.2.0) Operating System: OSX (I’ve also seen it on Alpine) Additional tools: npm 6.14.4
Full shell output:
$ node -v
v14.1.0
$ npm -v
6.14.4
$ npm init -y
Wrote to /Users/erincalling/code/futzing/package.json:
{
"name": "futzing",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
$ npm install webpack
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
> fsevents@1.2.13 install /Users/erincalling/code/futzing/node_modules/watchpack-chokidar2/node_modules/fsevents
> node install.js
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"14.1.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm WARN futzing@1.0.0 No description
npm WARN futzing@1.0.0 No repository field.
+ webpack@4.43.0
added 348 packages from 210 contributors and audited 348 packages in 11.57s
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:5 (1 by maintainers)

Top Related StackOverflow Question
@ErinCall you need install
chokidar@3manually, just runnpm i -D chokidar, we can’t update it because it is a breaking change, so we provide an ability to install latest version manually. Fixed for webpack@5.@nolimitdev It is just a warning, ignore it. It was done for supporting watch on macos and node@14.
Warnings should NEVER be ignored but it would help if they were more clear or did not occur. Thankfully, this issue existed so I could find this information. Warnings are great!