4

I am trying to deploy firebase functions and it gives below errors:

    PS D:\projects\functions> yarn deploy
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
+  functions: required API cloudbuild.googleapis.com is enabled
+  functions: required API cloudfunctions.googleapis.com is enabled
i  functions: preparing functions directory for uploading...
i  functions: packaged functions (54.39 KB) for uploading
+  functions: functions folder uploaded successfully
i  functions: creating Node.js 16 function geoCodeByGoogle(us-central1)...
i  functions: creating Node.js 16 function placesByGoogle(us-central1)...

Functions deploy had errors with the following functions:
        geoCodeByGoogle(us-central1)
        placesByGoogle(us-central1)
i  functions: cleaning up build files...
Error: There was an error deploying functions:
- Error Failed to create function geoCodeByGoogle in region us-central1
- Error Failed to create function placesByGoogle in region us-central1
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I tried,

  1. Deleting functions form CLI
  2. Tried changing the region and redeployed but still does not work as it is going to previous region settings. 3.Deleting Node modules 4.Renaming functions 5.Deleting functions from console 6.Redploying

Nothing worked.

Any idea guys, how to resolve it?

Thanks

2 Answers 2

0

Do this in beginning:- npm install -g firebase-tools

1
  • 1
    How does this solve the problem? Read the other answer to this question.
    – Shmiel
    Commented Jun 15, 2022 at 16:37
-1

npm i -g firebase tools. Don't forget to do this.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.