Firebase 部署过去一直有效,但今天当我对规则和一些功能进行简单更新后尝试部署时,我收到此错误:
\nError: Failed to load environment variables from .env.:\n- Error Key FIREBASE_AUTH_EMULATOR_HOST starts with a reserved prefix (X_GOOGLE_ FIREBASE_ EXT_)\n- Error Key FIREBASE_STORAGE_EMULATOR_HOST starts with a reserved prefix (X_GOOGLE_ FIREBASE_ EXT_)\n- Error Key GCLOUD_PROJECT is reserved for internal use.\nRun Code Online (Sandbox Code Playgroud)\n这是错误的整个上下文:
\n\xe2\x9c\x94 functions: Finished running predeploy script.\ni firebase.storage: checking storage.rules for compilation errors...\n\xe2\x9c\x94 firebase.storage: rules file storage.rules compiled successfully\ni firestore: reading indexes from firestore.indexes.json...\ni cloud.firestore: checking firestore.rules for compilation errors...\n\xe2\x9c\x94 cloud.firestore: rules file firestore.rules compiled successfully\ni functions: ensuring required API cloudfunctions.googleapis.com is enabled...\ni functions: ensuring required API cloudbuild.googleapis.com is enabled...\n\xe2\x9c\x94 functions: required API cloudfunctions.googleapis.com is enabled\n\xe2\x9c\x94 functions: required API cloudbuild.googleapis.com is enabled\nError: Failed to load environment variables from .env.:\n- Error Key FIREBASE_AUTH_EMULATOR_HOST starts with a reserved prefix (X_GOOGLE_ FIREBASE_ EXT_)\n- Error Key FIREBASE_STORAGE_EMULATOR_HOST starts with a reserved prefix (X_GOOGLE_ FIREBASE_ EXT_)\n- Error Key GCLOUD_PROJECT is reserved for internal use.\nRun Code Online (Sandbox Code Playgroud)\n我在测试中使用一个 .env 文件来指向模拟器的位置,就是这样:
\nFIRESTORE_EMULATOR_HOST='0.0.0.0:8080'\nFIREBASE_AUTH_EMULATOR_HOST='0.0.0.0:9099'\nFIREBASE_STORAGE_EMULATOR_HOST='0.0.0.0:9099'\nGCLOUD_PROJECT='PROJECTNAME'\nRun Code Online (Sandbox Code Playgroud)\n这是否有原因导致现在才导致错误?当我删除它并部署它时,它就可以工作了。
\n| 归档时间: |
|
| 查看次数: |
1164 次 |
| 最近记录: |