我有两个Firebase托管项目设置。一种是产品,另一种是产品。我可以毫无问题地部署到产品中,但是暂不进行。似乎正在尝试上载,但无法上载到暂存项目。我想知道那里的其他人是否曾经遇到过这个问题或可以提供帮助?谢谢!
firebase.json:
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
当前可在此帐户上部署的项目: 火力基地的使用 活动项目:暂存(***)
C:\ Users \ User \ Desktop \ latitude的项目别名:
默认(默认)
产品(生产)
分期(staging)
产品部署:
cmd >> Firebase使用产品
cmd >> firebase deploy-仅托管
这将成功部署
Staging Deployment:
cmd >> firebase use staging
cmd >> firebase deploy --only hosting
! functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions@latest in your functions directory.
=== Deploying to '***'...
i deploying hosting
i hosting[***]: beginning deploy...
i hosting[***]: found 121 files in build
⠼ hosting: uploading new files [0/120] (0%)
Error: Task 9e6ecccaf01f8c92a07845658cef35f6d954b7284e8b5a1e1f8ccb779573f7ac failed: retries exhausted after 6 attempts
[2020-06-30T17:23:08.172Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:117:11)
at Object.resolve (path.js:139:9)
at Uploader._zipStream (C:\Users\User\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\hosting\uploader.js:206:41)
at C:\Users\User\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\hosting\uploader.js:186:22
at new Promise (<anonymous>)
at C:\Users\User\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\hosting\uploader.js:185:20
Error: Task 348b8c719eb4929fd8f166c38efb882a8de61526c2f421c1b14f78689af78188 failed: retries exhausted after 6 attempts
答案 0 :(得分:1)
这里可能会迟到,但我刚刚在遇到同样的问题时发现了这个问题。
就我而言,问题是我的 firebase.json
有一个 functions
值,但我没有函数源文件夹。