- Install project dependencies
npm install
- Install the Firebase CLI
npm install -g firebase-tools
- Login in to Firebase
firebase login
- Setup the firebase project we are deploying to
firebase init functions
- Select
Yesyou are ready to proceed - Create a new project in your firebase account for this deployment
- Select
Javascriptwhen asked what language would you like to use to write your Cloud Function - Select
Nowhen asked if you want to use ESLint to catch probable bugs and enforce style - Select
Nowhen asked to overwrite thepackage.json,index.jsand the.gitignorefiles - Select
Yeswhen asked if you want to install dependencies with npm now
- Deploy the project to firebase
firebase deploy
Deployments to Firebase may fail if using a version of Node higher than v14.18.2