gmnoob
gmnoob

Reputation: 37

Firebase - TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string

I have two firebase hosting projects setup. One is prod and the other one is staging. I can deploy to prod without any issue, but staging won't let me. It looks like it's trying to upload but fails to upload to the staging project. I was wondering if anyone else there faced this issue before or can assist? Thanks!

firebase.json:

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

Current projects available to deploy on this account: firebase use Active Project: staging (***)

Project aliases for C:\Users\User\Desktop\latitude:

default (default)
prod (production)
staging (staging)

Prod Deployment:
cmd >> firebase use prod
cmd >> firebase deploy --only hosting
this will be successful deployment

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

Upvotes: 2

Views: 1863

Answers (1)

Akro
Akro

Reputation: 2096

Might be late here, but I just found this question while having the same issue. In my case the issue was that my firebase.json had a functions value but I did not have a functions sources folder.

Upvotes: 3

Related Questions