firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

npm WARN deprecated [email protected]: request has been deprecated

Open sadhon opened this issue 4 years ago โ€ข 22 comments

I am trying to run "npm install -g firebase-tools" command on linux OS but it gives me the above error every time.On the other hand when I try to run "npx create-react-app app-name" command, it works fine. I searched the solution on the internet but did not find any acceptable solution. Is there any way to fix this problem.

sadhon avatar May 06 '20 18:05 sadhon

@sadhon thanks for reporting this! The request module is one of the most popular libraries in the whole ecosystem so the deprecation has hit almost everyone, including us.

@bkendall is already working on removing request from firebase-tools.

Right now you do not need to worry about this, it's not a security vulnerability and we expect it to be fixed in a future version.

samtstern avatar May 06 '20 18:05 samtstern

Today [email protected] installation is aborted due to this issue.

bogacg avatar Aug 06 '20 10:08 bogacg

@bogacg can you show logs from an aborted install?

samtstern avatar Aug 06 '20 10:08 samtstern

@samtstern I re-executed global install command and sorry, that one is a WARN, problem is @sindresorhus%2fis

npm -g install [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\firebase-tools\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@sindresorhus%2fis - Not found
npm ERR! 404
npm ERR! 404  '@sindresorhus/is@^0.14.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'got'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:

You need full log?

bogacg avatar Aug 06 '20 10:08 bogacg

That's a global ongoing npm issue today, please see: https://status.npmjs.org/incidents/cksjqc1w11v5

samtstern avatar Aug 06 '20 10:08 samtstern

The issue is still not resolved I'm tried almost 100 times still same error unable to install firebase-tools

AkhileshHN avatar Aug 06 '20 18:08 AkhileshHN

You may need to run npm cache clean to clear out any bad URLs you an into during the outage (untested, but that would be what I would do)

bkendall avatar Aug 06 '20 19:08 bkendall

As of npm@5, 
the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid.
If you want to make sure everything is consistent, use 'npm cache verify' instead.

...after npm cache verify I was able to install ๐Ÿ‘

bogacg avatar Aug 07 '20 09:08 bogacg

Yes thanks bogacg npm cache verify worked well

67joseph avatar Aug 10 '20 22:08 67joseph

Yes, its worked after npm cache verify . Thank you very much.

manojmadhu avatar Aug 24 '20 21:08 manojmadhu

npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 I got this output after typing the command "npm install --global surge". I tried "npm cache verify" like some of you did, but for me it doesn't solve the problem I again get these outputs. Can someone help me?

moodstudioseva avatar Feb 08 '21 21:02 moodstudioseva

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated /home/ubuntu/npm/bin/yo -> /home/ubuntu/npm/lib/node_modules/yo/lib/cli.js /home/ubuntu/npm/bin/yo-complete -> /home/ubuntu/npm/lib/node_modules/yo/lib/completion/index.js

[email protected] postinstall /home/ubuntu/npm/lib/node_modules/yo yodoctor

Yeoman Doctor Running sanity checks on your system

โœ” No .bowerrc file in home directory โœ” Global configuration file is valid โœ– NODE_PATH matches the npm root

Unable to find the npm root, something went wrong. Try to execute npm -g root --silent on your command-line

โœ” No .yo-rc.json file in home directory โœ” Node.js version { Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn yo', path: 'yo', spawnargs: [ '--version' ], cmd: 'yo --version' } โœ– yo version { Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19) errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn yo', path: 'yo', spawnargs: [ '--version' ], cmd: 'yo --version' } โœ” npm version

Found potential issues on your machine :(

### please help me with this error

poojabhargava30 avatar Feb 17 '21 17:02 poojabhargava30

Any one have resolution for this.

satyaprasad317 avatar Mar 01 '21 14:03 satyaprasad317

try to install npm new version i try with that and work!! command: npm install -g npm

ghost avatar Mar 11 '21 03:03 ghost

@samtstern Any news about this?

To help you, jsdom (used in JEST) has gone through a similar re-engineering, and landed on node-fetch. Their solution is coming up soon, leaving firebase-tools the only tool I use that still brings up this warning.

From a developer point of view, it's annoying that there will likely be great announcements on Google IO while an issue like this is still open. Also maintenance is important. ๐Ÿงน

Current situation:

$ npm init
...

$ npm install -D firebase-tools
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 710 packages, and audited 711 packages in 19s

28 packages are looking for funding
  run `npm fund` for details

4 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

akauppi avatar May 14 '21 05:05 akauppi

Related: @firebase/rules-unit-testing has the same issue: https://github.com/firebase/firebase-js-sdk/issues/3009

akauppi avatar May 14 '21 05:05 akauppi

It's true that request is deprecated but that doesn't mean it's in any way dangerous! There is nothing related to request or its dependencies in our npm audit report. I have just sent out a PR to significantly clear up our npm audit report: https://github.com/firebase/firebase-tools/pull/3368

We have made a decision not to rush and try to remove request from the codebase all at once as that will almost certainly introduce bugs. Instead we are moving away piece-by-piece as we fix other things.

If anyone wants to pick a part of this codebase and remove request, PRs are welcome!

samtstern avatar May 14 '21 13:05 samtstern

I'm not very worried about it either - and it's reassuring just to know you're taking it away, alongside other work.

The audits are a bigger concern, and I'm glad to see the PR you mention.

akauppi avatar May 14 '21 17:05 akauppi

given that fetch is now built right in to nodejs deno and workers i think that you should aim at using fetch instead, wether it comes from node-fetch undici or node itself... using something like axios isn't good as it dose not work in workers and dose not support streaming.

jimmywarting avatar Feb 11 '22 17:02 jimmywarting

Voting for undici since the Node implementation is using it.

akauppi avatar Jun 23 '22 17:06 akauppi

request is going to be completely removed in the next breaking change.

bkendall avatar Jun 27 '22 20:06 bkendall

It seems, while removing deprecated packages, uuid is an easy update as well as debug. These warnings have been hanging around too long. They give SecOps teams heartburn.

โฏ npm -g install [email protected]
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

Brian-McBride avatar Jul 08 '22 15:07 Brian-McBride

Update on this:

This is on our radar, and we've stopped using this dependency almost everywhere in the codebase. However, the functions:shell command, which provides a REPL for testing out your functions, exposes request as part of its public API, so we cannot easily remove request without making a breaking change. Next time we release a major version, we plan to make this change & remove request - however, for now, hold tight and rest assured that this package is minimally used in firebase-tools

joehan avatar Mar 14 '23 17:03 joehan

It's been nearly 3 years since this issue was posted, when will the dependencies be removed...?

ghost avatar Mar 18 '23 14:03 ghost

There's now a moderate security issue on the deprecated request package, which I assume will never be fixed. Is there a timeline for removing the last remaining request package usage?

brianwestphal avatar May 22 '23 00:05 brianwestphal

I have the same issue . What is the solution please

gr8kev avatar Jun 30 '23 13:06 gr8kev

request is only used in functions:shell any more. Changing the interface there is non-trivial, since it exposed request's interface. But, nowhere else in the code do we use request. We're aware of the warning and are trying to prioritize fixing functions:shell, but don't have an ETA to share yet.

bkendall avatar Jun 30 '23 16:06 bkendall

request is affected by 2 vulnerabilities :

  • moderate Server-Side Request Forgery, more info: https://www.npmjs.com/advisories/1091725
  • moderate tough-cookie Prototype Pollution vulnerability, more info: https://www.npmjs.com/advisories/1092448

KuSh avatar Jul 11 '23 09:07 KuSh