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.

Migrate away from request package

See original GitHub issue

The request module is now fully deprecated and will no longer receive any fixes.

Its latest published version, 2.88.2, adds a deprecation warning whenever it is npm-installed. On that basis, we’ll stick on 2.88.0 for the time being otherwise we’ll get needless issues from our end-users.

But it does mean we need a plan to migrate off the request package to something else. I don’t yet know what that will be, but this issue gives a good list of potential alternatives: https://github.com/request/request/issues/3143

For more info on the deprecation of request, refer to this issue: https://github.com/request/request/issues/3142

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:23 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
boisei0commented, Dec 21, 2020

If we can get a better sense of the true impact of the agent-base issue, that would be helpful.

If my neck will stay cooperative for the rest of the evening, I think I can put together a quick prototype to figure out which/how many nodes would be affected by a move to got. My neck is a big if, just like how I haven’t programmed anything beyond a couple lines in JavaScript in months. But this sounds doable.

1reaction
knollearycommented, Jul 21, 2021

So we have shipped this and sure enough, had a couple reports of issues thanks to old levels of agent-base.

I am adding some code to the request node that detects the patched module and restores the original code. It then displays this warning:

---------------------------------------------------------------------
Patched https.request function detected. Restoring original code.
This is likely caused by the 'agent-base@<5.0.0' module that has
been installed as a dependency of a contrib node.

You can identify what node is at fault by running:
   npm list agent-base
in your Node-RED user directory (/Users/nol/.node-red)
---------------------------------------------------------------------

(the user dir is inserted dynamically…)

That should keep the core working and help nail down the modules that need updating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS: migrate from deprecated Request package to Got
The Request package is deprecated… some tips beyond the docs and migration guide when moving to Got. Many of you may use the...
Read more >
Request is going into maintenance mode, this is what you ...
Request is going into maintenance mode, find the implications for the Node.js ecosystem and the best-supported alternatives to replace it.
Read more >
How to migrate from request to axios - Stack Overflow
I just migrated from request to axios, and i recommand the following changes: import qs package const httpsAgent = new https.
Read more >
How to migrate away from Bower? · Bower blog
If you came here because of “Request to xxx failed with 410” error, ... Indeed, until recently Yarn neither could install Bower packages...
Read more >
Request - npm
This package has been deprecated. Author message: request has been deprecated, see https://github.com/request/request/issues/3142 ...
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