Firebase功能部署失败

时间:2020-09-24 07:55:27

标签: firebase google-cloud-functions

我无法将我的应用程序部署到生产环境中。我只有Firebase托管和功能。在firebase serve上一切正常。

我得到以下错误:


    i  deploying functions, hosting        
    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 (46.72 KB) for uploading
    +  functions: functions folder uploaded successfully
    i  hosting[library-app-d49fe]: beginning deploy...
    i  hosting[library-app-d49fe]: found 19 files in public
    +  hosting[library-app-d49fe]: file upload complete
    i  functions: updating Node.js 10 function app(us-central1)...
    !  functions[app(us-central1)]: Deployment error.
    Function failed on loading user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs
    
    
    Functions deploy had errors with the following functions:
            app
    
    
    To try redeploying those functions, run:
        firebase deploy --only "functions:app"
    
    
    To continue deploying other features (such as database), run:
        firebase deploy --except functions

我的firebase.json看起来像这样


    {
        "hosting": {
            "public": "public",
            "rewrites": [{
                "source": "**",
                "function": "app"
            }],
            "ignore": [
                "firebase.json",
                "**/.*",
                "**/node_modules/**"
            ]
        }
    }

和我的app.js在functions文件夹中具有以下导出: exports.app = functions.https.onRequest(app);

很抱歉,如果我没有提供必要的详细信息,但我不知道可能是什么问题。

0 个答案:

没有答案