Amplify -v itself downloading latest version of amplify? - aws-amplify

When i am trying to uninstall amplify it is not uninstalling it and when trying to check version using amplify -v it is downloading latest version of amplify itself.
On uninstall it should uninstall amplify and on amplify -v don’t download it itself.

Related

Multiple Versions of Firebase Installed - Which Do I Use?

I'm trying to build an app with Firebase and ran a few commands to see which version I have. To follow along with a 2021 instruction video, I was hoping to have Firebase v9. Depending on the command that I run, I somehow have versions 8 and 11. If I have these two versions, which one is actually being used? What is the difference between seemingly having an npm firebase and non-npm firebase installed?
armadillo#armadillo-MacBook-Air my-app % npm firebase --version
8.11.0
armadillo#armadillo-MacBook-Air my-app % firebase -V
11.2.2
If you're trying to work with the Firebase CLI, you should be looking at the firebase-tools npm package, not firebase. They are definitely not the same thing.
npm firebase-tools --version
I suggest reviewing the documentation as well.
As covered by #Doug's answer, the firebase command is defined by the firebase-tools npm package (or by https://firebase.tools if installed that way) not the firebase package, which does not define any command line utilities.
Additionally, npm --version returns the version of npm you have installed. This includes if you add the name of a package there. (i.e. npm thisCouldBeAnythingNotANPMCommand --version will return the same result)
If you want to view the version of a deployed package, you would use one of the following commands to query NPM's database:
npm view firebase version (view package's "version" field)
npm v firebase version (view package's "version" field, using shorthand)
npm view firebase (get all available package information)
If you want to view the version of a package installed in your project or globally, you would use:
npm ls firebase (local install)
npm ls -g firebase-tools (global install)
If you want to view the where the npm-installed commands are, you would use:
npm bin (local install)
npm bin -g (global install)
For the firebase command, the firebase/firebase.cmd/firebase.ps1 files all point to <global bin directory>/node_modules/firebase-tools/lib/bin/firebase.js.
Compare the results of:
> npm v firebase version
9.9.0
> npm ls firebase
`-- firebase#9.0.0-beta.6 (an old project directory for another SO answer)
> npm v firebase-tools version
11.2.2
> npm ls -g firebase-tools
`-- firebase-tools#9.21.0 (updated since :D)
> npm --version
6.4.12
> npm firebase --version
6.4.12
> npm v npm version
8.14.0 (updated since :D)

firebase functions:secrets:set is not a Firebase command

I am using cloud functions and would like to use Secret Manager to protect api keys for some services. Following the official documentation here , I tried using the command:
firebase functions:secrets:set STRIPE_TEST
but I received the following error:
Error: functions:secrets:set is not a Firebase command. Did you mean functions:config:set?
I want use secrets, not config that is not recommended
I was having the same problem on firebase-tools version 10.1.2. There's currently a newer version 11.1.0 available but I was having trouble upgrading or even uninstalling:
$ firebase --version
10.1.2
$ npm i -g firebase-tools
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
...
$ firebase --version
10.1.2
$ npm uninstall --location=global firebase-tools
up to date, audited 1 package in 52ms
$ firebase --version
10.1.2
I figured out I could successfully uninstall firebase-tools with curl -sL firebase.tools | uninstall=true bash then I reinstalled it with npm i --location=global firebase-tools
That finally upgraded firebase --version to 11.1.0 which fixed firebase functions:secrets:set SECRET_NAME for me.

Install old meteorjs version

The Meteor docs and website explain how to install the latest version, with curl https://install.meteor.com/ | shor npm install -g meteor, but I need to install a particular old version. How can I install Meteor version 1.11?
You can always install the latest version and then use your project's version to boot the older version.
Meteor will respect your .meteor/release file, and if you need to create a project with a specific version you can use meteor create --release 1.2.1 yourAppName.
You can provide a release parameter for example:
curl "https://install.meteor.com/?release=1.3.3.1" | sh
Also see:
how do I install a previous version of meteor JS?

how to update version of current Installed Deno

i installed vesion of 1.10.2 on my pc and i want to use last vestion of deno so
How can i update version of deno ?
should I use install command and install it again
or there is something like
npm install -g npm#latest
thank you
From Updating | Manual | Deno:
To update a previously installed version of Deno, you can run:
deno upgrade

firebase version is not updating through <npm install -g firebase-tools>

i am windows user and trying to update firebase version using
npm install -g firebase-tools but when i run firebase --version
it shows the same version.
I also run npm uninstall firebase --save and check firebase --version it shows same.
what should i do to update my firebase version?
npm update -g firebase-tools
or
npm install -g firebase-tools#3.12.0 to install a specific version
And make sure to restart your terminal/IDE otherwise, it won't take effect.
Have you tried npm update -g firebase-tools? This worked for me.
These days if you're on an older version, and you check the version of firebase-tools, by running:
firebase -V
along with the version of firebase-tools that you're on, it also gives you a messages, something like this:
So you can basically run npm i -g firebase-tools to update the version of your firebase-tools installation to the latest version.
Hope this helps :)
For other like me stumbling in with a weird version mismatch:
When I did firebase -V in my terminal I would get a different version (5.1.1) than when I ran firebase through a npm run script (3.19.3)
The problem was that I had previously installed firebase locally into that project. In other words, I was getting the global version in the terminal, but npm was using the node_modules version
To confirm this, I added a simple test called test-foo to my package.json (firebase -V && which firebase) and ran it:
kuzyn(λ)matebox‡ npm run test-foo
kuzyn-project#1.1.0 test-foo /home/kuzyn/code/kuzyn-project/firebase
firebase -V && which firebase
3.19.3
/home/kuzyn/code/kuzyn-project/firebase/node_modules/.bin/firebase
Then I removed the (uneeded in my case) local firebase package from the package.json and from node_modules
Try the 2 steps bellow
1. yarn/npm cache clean
2. npm install -g firebase firebase-tools or yarn add -g firebase firebase-tools
in a new terminal, firebse --version
works for me
it works to me...
standalone binary: Download the new version, then replace it on your system
if you are using the standalone.Download the new version
In my case I was using an old node version (v10) and had to switch to a newer one (v12). After that I ran npm install -g firebase-tools again and it was updated to the latest version.
You can check the current node version by running node -v. And I use nvm to switch to a different node version.
That might happen in case you've installed the firebase-cli using a so called automatic install script.
Try to call curl -sL https://firebase.tools | upgrade=true bash as described in the official documentation

Resources