dropbox-sdk-js icon indicating copy to clipboard operation
dropbox-sdk-js copied to clipboard

Old node-fetch dependency chain causing deprecation error

Open Downchuck opened this issue 1 year ago • 3 comments

The latest SDK is a bit long in the tooth - the node-fetch requirement is dated and in the dependency chain causes a deprecation warning from the yarn package manager.

While that node-fetch package could be bumped to something more current, or ade optional per #1130 the use of built-in fetch may have some challenges.

So, as a workaround for yarn users, this one can help:

  "resolutions": {
    "whatwg-url": "14.0.0 "
  },

Downchuck avatar Sep 08 '24 19:09 Downchuck

Thanks for sharing this! I'll ask the team to update the SDK to address this.

greg-db avatar Sep 09 '24 15:09 greg-db

For NPM the equivalent workaround is adding an overrides key to package.json:

  "overrides": {
    "whatwg-url": "14.0.0"
  }

I don't know how far back the SDK wants to go with node support, but modern nodes ship with built-in fetch so the SDK might consider completely eliminating the dependency

unilynx avatar Oct 16 '24 10:10 unilynx

Thanks for the information!

greg-db avatar Oct 16 '24 15:10 greg-db