npm · npm
The message
npm WARN deprecated request@2.88.2: request has been deprecated
What it means
The package's author marked that version as no longer recommended: it installed and it still works. It is usually not something in your own package.json but a transitive dependency dragged in by a package you do use. Asking by name with npm ls request shows which of your direct dependencies pulls it in, and the place to fix is that direct dependency, not this package. There is nothing to do today — deprecated is not a security vulnerability, and npm audit is what tells you about those.
The fix
npm ls request- Printed by
- npm
- npm
- 20
With npm the cause sits in the first code XXXX line rather than the last six npm ERR! lines, and when the failure comes from the dependency tree or a native build instead of your own code, deleting node_modules and installing again clears about half of them.
Reading an error message
- Read from the first line down. The lower you go the more it is about the tool’s internals; the cause is usually at the top.
- If there is a file and a line number, start there — not the top stack frame, but the topmost line that names a file you wrote.
- Search the message verbatim, but strip your own paths and variable names first; those are what stop the search from matching.
- The same condition is worded differently across tool versions. If results look wrong, add the version number to the query.
- Before pasting a fix, check what it throws away. Some of these cannot be undone.
Common questions
Q. What does “npm WARN deprecated request@2.88.2: request has been deprecated” mean?
The package's author marked that version as no longer recommended: it installed and it still works. It is usually not something in your own package.json but a transitive dependency dragged in by a package you do use. Asking by name with npm ls request shows which of your direct dependencies pulls it in, and the place to fix is that direct dependency, not this package. There is nothing to do today — deprecated is not a security vulnerability, and npm audit is what tells you about those.
Q. How do I fix it?
npm ls request — before running it, check the explanation above for what this command discards.
Q. Which tool prints this?
npm. It sits under npm, and the message runs to 8 words.