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.

Upgrade watchpack for node 14 compatibility

See original GitHub issue

With 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:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

31reactions
alexander-akaitcommented, May 20, 2020

@ErinCall you need install chokidar@3 manually, just run npm 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.

13reactions
uchuugakacommented, Jun 16, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

watchpack - npm
Wrapper library for directory and file watching.. Latest version: 2.4.0, last published: 7 months ago. Start using watchpack in your project ...
Read more >
What version of Node should I use - sage - Roots Discourse
I currently have: node v12.22.6 yarn v1.22.17 npm v6.14.15 I just want to know whats the optimum versions to develop local…
Read more >
node.js - Ruby/NodeJS/Yarn Issue - Stack Overflow
Trying to get a project up and running, but the install of node-sass is problematic. Not sure what's causing this error:.
Read more >
From v27 to v28 - Jest
Upgrading Jest from v27 to v28? This guide aims to help ... Compatibility​. The supported Node versions are 12.13, 14.15, 16.10 and above....
Read more >
Need Help regarding setting up project Vue cli
Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated ... 1 will break on node v14+ and could be using insecure...
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