无法部署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 in your functions directory.
! functions: Please note that there will be breaking changes when you upgrade.
i functions: Loaded environment variables from .env.prod.
! functions: You are using an old version of firebase-functions SDK (3.15.7). Please update
firebase-functions SDK to >=3.20.0
i functions: preparing functions directory for uploading...
i functions: packaged E:\FlutterProjects\pegasus\functions (218.61 KB) for uploading
Error: Failed to fetch Run service undefined
3条答案
按热度按时间7y4bm7vi1#
我有同样的问题,它是为我修复时,安装了最新的firebase工具
npm安装-g firebase工具
t9eec4r02#
你需要更新你的firebase-tools。运行npm install -g firebase-tools。
4ngedf3f3#
通过使用命令
npm install -g firebase-tools.
升级firebase-tools的版本,也可以自动修复此问题如果遇到以下错误,可以添加--force标志