I'm trying to login to my Firebase account with cli command firebase login
. I believe it should open browser and prompt me to login with my google account, but that doesn't seem to happen.
Instead, it's asking me to enter my email and password in the terminal. Once I enter my credentials, it throws the following error:
/usr/lib/node_modules/firebase-cli/node_modules/source-map-support/source-map-support.js:223 return '\n at ' + wrapCallSite(frame); ^ TypeError: CallSite method toString expects CallSite as receiver
How do I fix this as I want to deploy my app to Firebase?
The Firebase CLI (GitHub) provides a variety of tools for managing, viewing, and deploying to Firebase projects. Before using the Firebase CLI, set up a Firebase project.
Run firebase tools --version to check version. And as per the prompt, run npm install -g firebase-tools to update.
To sign a user into your app, you first get authentication credentials from the user. These credentials can be the user's email address and password, or an OAuth token from a federated identity provider. Then, you pass these credentials to the Firebase Authentication SDK.
The Firebase Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Firebase project from the command line. To get started with the Firebase CLI, read the full list of commands below or check out the documentation. You can install the Firebase CLI using npm (the Node Package Manager).
To solve the error "firebase: command not found", install the firebase cli package globally by running npm install -g firebase-tools and restart your terminal. If the command fails, run it with sudo and make sure the correct PATH is set in your system's environment variable.
firebase CLI will not recognize current directory for 'firebase init' 1 Permission access error while installing Firebase tools/CLI 10 Unable to login Firebase with cli command 0 Firebase CLI Unexpected token
If the global installation of Firebase fails, you might have to run the command prefixed with sudo. If the "firebase: command not found" error is not resolved, try restarting your terminal. The command will show you the path where npm puts your globally installed packages.
I've had the same issue.
You're probably using firebase-cli
instead of firebase-tools
.
https://firebase.google.com/docs/cli#update-cli
firebase-cli
has been deprecated years ago.
@mikeonline did you ever installed the Firebase tools/cli before on your machine (before we launched v3 at Google IO) basically did you have v2.2 previously installed perhaps?
firebase-cli has been deprecated a year ago and only installs v1. NPM should have printed this message"
npm WARN deprecated [email protected]: Use firebase-tools instead. Both v2 and v3 can be installed with npm install -g firebase-tools but by default the latest version (3.0.0) gets installed.
https://github.com/firebase/codelab-friendlychat-web/issues/22#issuecomment-220695413
Execute the below command
npm uninstall firebase-cli
npm uninstall firebase-tools
npm install -g firebase-tools --force
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With