A popular Node.js package, request, has been deprecated

; Date: Thu Feb 13 2020

Tags: Node.JS

What do we do when a venerated elder is supplanted by young whipper-snappers? Node.js is barely 10+ years old, and the availability of async/await and other JavaScript features means older packages must either adapt or be replaced. The community around the request package chose the latter, to let Request become deprecated, and to officially recommend folks to use other packages.

The request package has been in the Node.js community since the beginning. It provides excellent comprehensive support for making HTTP requests from inside a Node.js application. However....

Bottom line is that the Request package, despite being highly popular, cannot be effectively updated to the New JavaScript Paradigm, and therefore the Request team has deprecated the package. It then puts a requirement on the rest of us to find alternatives and to rewrite our applications to match.

Source npmjs.com

These stats tell us a lot, that it is an extremely popular package. It also says it is a large package, and that there's a lot of outstanding issues and pull requests.

Back in May 2019, Mikeal Rogers (the creator of Request and many other packages), posted an issue to the Request Github repository suggesting that the team should Deprecate Request rather than try to patch it up for the modern era. See: (github.com) https://github.com/request/request/issues/3142

As Mikeal noted - in 2009 when he created Request, it used API's that predate the standard Callback paradigm, the Streams paradigm, the existence of node_modules, the npm package manager, and of course newfangled features like async/await, classes, Promises, and all the rest.

The Request team did migrate the internals to some of the new features. But in his estimation, redeveloping Request to use the new features would entail a complete rewrite.

Therefore it is Mikeal's opinion that:

The most valuable thing request can do for the JavaScript ecosystem is to go into maintenance mode and stop considering new features or major releases.


The best thing for these new modules is for request to slowly fade away, eventually becoming just another memory of that legacy stack. Taking the position request has now and leveraging it for a bigger share of the next generation of developers would be a disservice to those developers as it would drive them away from better modules that don’t have the burden of request’s history.

It does not mean that Request will stop making releases. But any new release will be very minor in scope, probably limited to critical bug fixes.

In the comments we see that Request has effectively been in this status for some time. The large number of outstanding issues and pull requests, for example, suggests that the Request team had slowed putting effort into the package.

Another issue lists a number of alternative packages: (github.com) https://github.com/request/request/issues/3143

About the Author(s)

(davidherron.com) David Herron : David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.

Books by David Herron