You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
The request module is not marked as a dependency, and it's used in the Fetch module.
Request
Make request a dependency or peerDependency in package.json.
Alternative
Because request is deprecated (as of February 11), an alternative would be to use something like cross-fetch (link) which will allow this module to work with both client-side (browser window.fetch natively or via polyfill) as well as server-side (via node-fetch).
I'm willing to contribute, let me know what approach you'd prefer.
The text was updated successfully, but these errors were encountered:
I was trying to avoid using any external dependencies and only decided to use request because it came with nodejs.
That said since request is deprecated, using cross-fetch make sense. Please go ahead and make the change.
Oh, I assumed this was intentionally using the the npm request module as I don't see any documentation for a generic request module in Node.js. (Maybe you're picking it up transitively in your projects that are using this module?)
cross-fetch seems like best option for universal support (browser and node.js), it's about 7.5KB (pre-gzip). I see references to some other request alternatives when searching around, but cross-fetch is the one I'm most familiar with.
Summary
The
request
module is not marked as a dependency, and it's used in theFetch
module.Request
Make
request
a dependency or peerDependency inpackage.json
.Alternative
Because
request
is deprecated (as of February 11), an alternative would be to use something likecross-fetch
(link) which will allow this module to work with both client-side (browserwindow.fetch
natively or via polyfill) as well as server-side (vianode-fetch
).I'm willing to contribute, let me know what approach you'd prefer.
The text was updated successfully, but these errors were encountered: