【问题标题】:Firebase - TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type stringFirebase - TypeError [ERR_INVALID_ARG_TYPE]:“路径”参数必须是字符串类型
【发布时间】:2020-10-21 02:36:54
【问题描述】:

我有两个 Firebase 托管项目设置。一个是prod,另一个是staging。我可以毫无问题地部署到 prod,但暂存不会让我这样做。看起来它正在尝试上传,但未能上传到临时项目。我想知道那里是否有其他人以前遇到过这个问题或可以提供帮助?谢谢!

firebase.json:

"hosting": {
    "public": "build",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],

可在此帐户上部署的当前项目: 火力基地使用 活动项目:暂存 (***)

C:\Users\User\Desktop\latitude 的项目别名:

默认(默认)
产品(生产)
分期(分期)

产品部署:
cmd >> firebase 使用 prod
cmd >> firebase deploy --only 托管
这将是成功的部署

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

【问题讨论】:

    标签: firebase firebase-hosting firebase-cli


    【解决方案1】:

    这里可能会迟到,但我只是在遇到同样问题时发现了这个问题。 就我而言,问题是我的 firebase.json 有一个 functions 值,但我没有函数源文件夹。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-12
      • 2021-12-24
      • 1970-01-01
      • 2020-09-21
      • 2022-01-12
      • 2021-09-08
      • 2020-12-30
      相关资源
      最近更新 更多