why npm install -g firebase-tools request has been deprecated - request

I'm trying to deploy react application to firebase using Github actions.
On the git bash terminal I typed:
$ npm install -g firebase-tools
It answered:
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid#3.4.0: 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.
I didn't understand what should I do? Can anyone help me?

to solve this problem I tried
npm update -g firebase-tools
But it doesn't work because the library is not supported anymore. Furthermore, firebase tools are obligatory for the firebase login:ci command to generate an authentication token for use in non-interactive environments. . But you know it was meaningless without firebase tools.
curl -sL firebase.tools | bash
This command line helps you to download and install CLI without any dependencies. It worked.
As a next step I typed:
firebase login:ci
But there was a mistake again :
Error: Cannot run login:ci in non-interactive mode.
to activate it:
firebase login --interactive
All these command lines were tested and approved, IT WORKS

Related

how can i install react native on window command?

i tried to install 'npm install --global expo-cli' and i get this error. svgo#1.3.2 this svgo is no longer supported. upgrade to v2.x.x, uuid#3.4.0 please upgrade to version 7 or higher, chokidar#2.1.8: chokidar 2 does not receive security update since 2019. i run npm audit fix --force, it said recommended protection disable and 7 packages are looking for funding
These are warns regarding libraries you are downloading from the web, don't be concerned by them, you cannot fix those issues. Just ignore it and start using expo. Everything is installed fine. Same errors appear when installing plain React project from the official source, you just need to ignore those warnings.

Error when running created React Native project

I'm running the following from the command line:
npx react-native init AwesomeProject
...and I see the following output after the React logo:
Welcome to React Native!
Learn once, write anywhere
✖ Downloading template
error Error: Command failed: yarn add react-native#latest
error Couldn't find any versions for "#jest/types" that matches "^27.2.4"
warning react-native > #react-native-community/cli-platform-ios > xcode > uuid#3.4.0: 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.
...
yarn add v1.22.11
info No lockfile found.
[1/4] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Why is it complaining?
Is it possible that you have mistakenly written the dependency's name? Isn't it #types/jest instead? See https://www.npmjs.com/package/#types/jest
uninstall node
reinstall using package manager like 'homebrew'
try again 'npx react-native init project'

what is the difference between npm install -g react-native-cli versus using npx react-native init <project name>?

**what is the difference between setting up react-native- cli with npm install -g react-native-cli and init versus using npx react-native init ?
I recently got a lot of eneont errors while developing react-native app. firstly i setup my system with npm install -g react-native and was working fine but later while installing dependencies they got eneont errors like could not find fsevent, nanoid, hammerjs etc.
And the official documentation includes setup to use npx. I really got confused with this sort of approach.
could you please light some knowledge on npm vs npx and installing with '-g' argument?
npx is a npm package runner (x probably stands for eXecute). The typical use is to download and run a package temporarily or for trials.
With npm you install the package on your machine. And global makes it available to all your projects not only the one where you currently work in.
As yesIamFaded pointed out, the npx command does indeed download the package for each time you run the code and from a networking standpoint it might beneficial. However, as per React-Native documentation (which you can find here) the cli has been deprecated and it may cause issues. To quote the doc:
If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues.
So personally i would not go near it.

firebase command is not working after using yarn global on windows10

I am installing firebase-tools with yarn with the following command:
yarn global add firebase-tools
After it I am trying:
firebase login
And It giving me command not found an error. Please answer to solve this problem.
I am using Windows 10 operating systems.
/// Also I have tried some methods described on StackOverflow but nothing works.
I need a reliable solution.
If you installing firebase-tools using this command :
yarn global add firebase-tools
After that execute this command :
export PATH="$(yarn global bin):$PATH"
and then run the command firebase login
First, you need to check if the firebase-tools package is installed, using yarn info firebase-tools.
Then, to log in, use yarn firebase login.
If you're having trouble getting firebase-tools to work through Node.js, I recommend installing the pre-built binary for your platform. The standalone binary for windows can be found here.

Found 4 vulnerabilities on npm install

I am just getting started with react-native. On installing this package
npm install --save react-native-validator-form
https://github.com/NewOldMax/react-native-validator-form/issues/3
I was prompted to npm audit and I was shown 4 vulnerabilities (listed above)
After running the 2 helper commands, I was prompted with another 2 vulnerabilities (see link)
How can I fix the remaining issues?
Updating the respective npm packages didn't work.
Not sure how to proceed?
This is a result of the new npm version including the audit command.
It isn't some new issue with the Angular CLI, npm just introduced new functionality in npm to warn users about vulnerabilities in the packages they're installing - so there's no "new" vulnerability in Angular, it's just that now npm is now warning you about vulnerabilities that already existed:
https://blog.npmjs.org/
Most of the issues stem from Karma, so it'd need to be fixed there for the Angular team to pull in a new Karma version karma-runner/karma#2994
If you have ran npm audit and got vulnerabilities, then you can have different scenarios:
Security vulnerabilities found with suggested updates
Run the npm audit fix subcommand to automatically install compatible updates to vulnerable dependencies.
Run the recommended commands individually to install updates to vulnerable dependencies. (Some updates may be semver-breaking changes; for more information, see "SEMVER warnings".)
Security vulnerabilities found requiring manual review
If security vulnerabilities are found, but no patches are available, the audit report will provide information about the vulnerability so you can investigate further.
Source: Reviewing and acting on the security audit report
Even after running npm audit fix if it is not fixed, then to proceed I think you should Turn off npm audit. Use below command to turn off npm audit.
when installing a single package.
npm install example-package-name --no-audit
To turn off npm audit when installing all packages
npm set audit false
it will set the audit setting to false in your user and global npmrc config files.
for reference visit : turn-off-npm-audit
Hope it will help and you can proceed to your work :) Happy codding
I had the same issue and log was like below:
Testing binary
Binary is fine
added 1166 packages from 1172 contributors and audited 39128 packages in 112.505s
found 1 high severity vulnerability
I executed the below command and it was fixed.
npm audit fix
log shows as below:
Testing binary
Binary is fine
+ #angular-devkit/build-angular#0.11.4
added 18 packages from 47 contributors, removed 14 packages and updated 52 packages in 64.529s
fixed 1 of 1 vulnerability in 39128 scanned packages
I faced the same issue while installing react-native navigation, using:
npm install react-navigation
For me, npm audit-fix didn't worked well. npm use to have some limitations. For me, yarn worked:
yarn add <package-name>
This worked for me:
Module not found: Can't resolve 'react-router-dom'
vulnerable dependencies:[1]: https://github.com/edjata1/Fix_Issues/blob/main/REACT%20ERROR%20vulnerable%20dependencies%20issues.txt
I had the same problem while running this command:
npm install ngx-bootstrap --save
...and solved it by running the Command Prompt as Administrator.
So Open the Command Prompt as Administrator and then try again. Hopefully it will work.

Resources