当我创建我的第一个部署函数时我无法部署因为我有错误要求我升级到我的帐户到 Blaze 我需要知道我可以在使用免费帐户时部署函数吗??
输出:
i deploying functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
! functions: missing required API cloudbuild.googleapis.com. Enabling now...
+ functions: required API cloudfunctions.googleapis.com is enabled
Error: Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan. To upgrade your project, visit the following URL:
https://console.firebase.google.com/project/institute-for-admin/usage/details
For additional information about this requirement, see Firebase FAQs:
https://firebase.google.com/support/faq#functions-runtime
Run Code Online (Sandbox Code Playgroud) 今天我部署了firebase托管.部署之后,我注意到firebase创建了文件.firebase/hosting.ALPHANUM.cache
,其中ALPHANUM实际上是一些随机baseNN ish值.
.gitignore
吗?
我正在尝试设置firebase函数,但运行firebase init后出错.
错误:HTTP错误:401,请求具有无效的身份验证凭据.预期的OAuth 2访问令牌,登录cookie或其他有效的身份验证凭据.请参阅https://developers.google.com/identity/sign-in/web/devconsole-project.
在我运行时:
firebase deploy
Run Code Online (Sandbox Code Playgroud)
我在命令行上收到此错误:
HTTP 错误:400,未找到项目“381106441303”的结算帐户。必须为激活服务“cloudbuild.googleapis.com,containerregistry.googleapis.com”启用计费才能继续。
请告诉我如何解决这个问题!
无法部署 Firebase 功能。我有两个项目别名,它对于第一个项目(dev)工作正常,但对于第二个项目(prod)则不然。
每当我写作时,firebase deploy --only functions
我都会收到以下消息
i deploying functions
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
+ functions: required API cloudbuild.googleapis.com is enabled
+ artifactregistry: required API artifactregistry.googleapis.com is enabled
+ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing codebase default for deployment
! functions: package.json indicates an outdated version of firebase-functions. Please upgrade
using npm install --save firebase-functions@latest …
Run Code Online (Sandbox Code Playgroud) firebase google-cloud-platform google-cloud-functions firebase-cli
当我打开 firebase CLI 时出现此错误:
Let's make sure your Firebase CLI is ready...
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at ChildProcess.<anonymous> (C:\snapshot\firepit\welcome.js:115:27)
at ChildProcess.emit (events.js:311:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:311:20)
at Pipe.<anonymous> (net.js:668:12)
Run Code Online (Sandbox Code Playgroud)
我使用的是 Windows 10 专业版
今天早上我试图将我的反应项目部署到 firebase 托管,但我收到了这个错误:
Error: Server Error. certificate has expired
Run Code Online (Sandbox Code Playgroud)
然后我尝试执行firebase list
命令来查看我的项目列表,但我再次收到相同的错误!我在其他项目上尝试过,结果相同。所以我相信这个错误与特定项目无关,它与firebase-tools
. 这是错误日志:
[debug]
[debug] [2020-01-07T03:37:57.789Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-01-07T03:37:57.789Z] > authorizing via signed-in user
[debug] [2020-01-07T03:37:57.792Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
[debug] [2020-01-07T03:37:58.566Z] Error: certificate has expired
at TLSSocket.<anonymous> (_tls_wrap.js:1116:38)
at emitNone (events.js:106:13)
at TLSSocket.emit (events.js:208:7)
at TLSSocket._finishInit (_tls_wrap.js:643:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:473:38)
[error]
[error] Error: Server Error. certificate has expired
Run Code Online (Sandbox Code Playgroud) 我整天都在成功地使用Firebase部署功能,学习如何使用它。我试图查看如果初始化了另一个部署到同一项目的目录并且在更新npm版本之前没有任何问题的情况,直到我更新npm版本时发生了什么,现在我每次尝试部署时都收到“发生意外错误”
我尝试通过使自己的用户成为node_modules,bin和共享目录的所有者来更新npm权限。我尝试卸载并重新安装firebase-tools。我还尝试删除所有当前函数目录并初始化一个新目录,然后在其中重新安装我的依赖项。
这是调试日志
Dylans-MacBook-Pro-3:functions dsenderling$ firebase deploy --debug
[2019-07-03T18:04:35.526Z] ----------------------------------------------------------------------
[2019-07-03T18:04:35.528Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy --debug
[2019-07-03T18:04:35.529Z] CLI Version: 7.0.2
[2019-07-03T18:04:35.529Z] Platform: darwin
[2019-07-03T18:04:35.529Z] Node Version: v10.16.0
[2019-07-03T18:04:35.529Z] Time: Wed Jul 03 2019 13:04:35 GMT-0500 (Central Daylight Time)
[2019-07-03T18:04:35.529Z] ----------------------------------------------------------------------
[2019-07-03T18:04:35.537Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2019-07-03T18:04:35.537Z] > authorizing via signed-in user
[2019-07-03T18:04:35.537Z] [iam] checking project my-awesome-project-5a4e9 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[2019-07-03T18:04:35.539Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/my-awesome-project-5a4e9:testIamPermissions
permissions=[cloudfunctions.functions.create, cloudfunctions.functions.delete, cloudfunctions.functions.get, cloudfunctions.functions.list, cloudfunctions.functions.update, cloudfunctions.operations.get, firebase.projects.get]
[2019-07-03T18:04:35.769Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, …
Run Code Online (Sandbox Code Playgroud) 我最近遇到firebase deploy命令的问题.在firebase部署命令之后,除了firebase(存储,数据库等)之外,所有其他人都被部署了所以我决定重新安装firebase来修复这种情况,但重新安装后我的问题变大了.现在没有部署它们,并出现以下错误:
i deploying database, functions
Running command: npm --prefix $RESOURCE_DIR run lint
npm ERR! path C:\Users\faruk\Google Drive\Android\firebase\1\$RESOURCE_DIR\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\faruk\Google Drive\Android\firebase\1\$RESOURCE_DIR\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\faruk\AppData\Roaming\npm-cache\_logs\2018-01-24T18_21_34_878Z-debug.log
Error: functions predeploy error: Command …
Run Code Online (Sandbox Code Playgroud) 我的 Windows 11 计算机上安装了 11.0.1 版本的 firebase。当我运行 firebase 模拟器时,它崩溃并显示以下消息:
$ firebase emulators:start
!! 模拟器:firebase-tools 不再支持 11 之前的 Java 版本。请升级到 Java 版本 11 或更高版本以继续使用模拟器。i 模拟器:关闭模拟器。
错误:firebase-tools 不再支持 11 之前的 Java 版本。请升级到 Java 版本 11 或更高版本以继续使用模拟器。
我尝试更新我的 Java,但它说我有最新版本:
我检查了我的版本,它说版本 8...但我需要 11?我很困惑:
我尝试在 CLI 中检查版本,结果更加困惑:
$ java -version
java 版本 "1.8.0_333"
Java(TM) SE 运行时环境(内部版本 1.8.0_333-b02)
Java HotSpot(TM) 64 位服务器 VM(内部版本 25.333-b02,混合模式)
我的问题是: