400 Billing account for project is not found. Billing must be enabled for activation of service(s)

后端 未结 9 447
故里飘歌
故里飘歌 2021-02-05 00:31

I am create API with firebase via this tutorial here.

On I run:

firebase deploy

I get this error on the command line:

相关标签:
9条回答
  • 2021-02-05 01:12

    It works fine for me you don't have to pay I'm using firebase free tier

    1st Downgrade node version from 10 to 8 on package.json

    "engines": {
    "node": "8"
      }
    
    1. firebase deploy

    2. you'll get + Deploy complete! message above that you'll see

      + functions[helloWorld(us-central1)]: Successful update operation.

    3. this us-central is my project hosted region in your case may be differ

      prefix to this region [helloWorld is my exported function name your case it may differ get this information from your terminal by firebase deploy command

    4. After that your hosted project link will be

    https://yourregion-firebaseprojectname.cloudfunctions.net/yourexportedfunctionname 
    

    (exported function name) which is helloWorld

    0 讨论(0)
  • 2021-02-05 01:14

    This is a example of scheduler , but this will not work in free account . Billing must be enabled for activation of service(s) 'cloudscheduler.googleapis.com' to proceed.

    import * as functions from 'firebase-functions';
    import {db, notificationSentEvent, deviceData} from './init';
    
    export const dailyDelete = functions.pubsub.schedule( '10 1 * * *' ).onRun(context => {
        console.log('At 01:10');
    })
    
    0 讨论(0)
  • 2021-02-05 01:22

    I get an error also!

    How you fix the error is: go to https://console.firebase.google.com/project/your_firebase_project/usage/details website and then follow the onscreen instructions.

    Then run the command in the Linux home directory on the Linux terminal:

    firebase deploy
    

    and it works!

    0 讨论(0)
  • 2021-02-05 01:23
    1. Go to firebase console
    2. Go to usage and billings
    3. Change plan from Free to Pay as you go
    0 讨论(0)
  • 2021-02-05 01:26

    You can lower the node version from 10 to 8, but you should upgrade your plan to 'Blaze' as it has the whole free plan, It will only charge you if you pass the free plan

    0 讨论(0)
  • 2021-02-05 01:27

    If you just want to finish a tutorial, just change Node version from 10 to 8 in package.json

    "engines": {
      "node": "8"
    }
    

    This will now work, but eventually after February 15, 2021 deployment of Node.js 8 functions will no longer be allowed. So, if you want to use cloud functions after this date you must be on Blaze pay-as-you-go billing plan.

    0 讨论(0)
提交回复
热议问题