cozy / cozy-client

Document store and React components for the Cozy platform
MIT License
13 stars 13 forks source link

fix: Force 2.7.0 version of node-fetch (SCR-604) #1480

Open doubleface opened 5 months ago

doubleface commented 5 months ago

To avoid "socket hang up" / ECONNRESET on consecutive requests with Node.js 19 and Node.js 20 https://github.com/node-fetch/node-fetch/issues/1735

We did not have this problem before because projects using cozy-client had 2.7.0 in their yarn.lock even if lower version was specified in package.json.

Crash-- commented 5 months ago

Since Cozy is running on node 20, I think we should delete the dep to node-fetch since native fetch can / should be used. If a service or a konnector needs to have something different than native fetch then it should polyfill it itself.

WDYT?