Firebase CLI: TypeError [ERR_INVALID_ARG_TYPE]: аргумент «путь» должен иметь тип string. Полученный тип не определен - PullRequest
1 голос
/ 11 января 2020

На FireBase Cli версии 7.11.0 я получаю эту ошибку при запуске firebase serve или firebase deploy.

// terminal error
owner@G700:~/PhpstormProjects/shopify/buyUsedServer$ firebase serve --debug
[2020-01-10T21:56:29.047Z] ----------------------------------------------------------------------
[2020-01-10T21:56:29.060Z] Command:       /home/owner/.nvm/versions/node/v10.16.3/bin/node /usr/local/bin/firebase serve --debug
[2020-01-10T21:56:29.061Z] CLI Version:   7.11.0
[2020-01-10T21:56:29.061Z] Platform:      linux
[2020-01-10T21:56:29.061Z] Node Version:  v10.16.3
[2020-01-10T21:56:29.062Z] Time:          Sat Jan 11 2020 04:56:29 GMT+0700 (Indochina Time)
[2020-01-10T21:56:29.064Z] ----------------------------------------------------------------------
[2020-01-10T21:56:29.064Z] 
[2020-01-10T21:56:29.083Z] > 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"]
[2020-01-10T21:56:29.083Z] > authorizing via signed-in user
[2020-01-10T21:56:29.084Z] [iam] checking project buyusedshopify for permissions ["firebase.projects.get"]
[2020-01-10T21:56:29.087Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/buyusedshopify:testIamPermissions  
 permissions=[firebase.projects.get]
[2020-01-10T21:56:30.516Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 10 Jan 2020 21:56:30 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, server-timing=gfet4t7; dur=1191, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[2020-01-10T21:56:30.519Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/buyusedshopify  

[2020-01-10T21:56:31.188Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 10 Jan 2020 21:56:31 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked

=== Serving from '/home/owner/PhpstormProjects/shopify/buyUsedServer'...

[2020-01-10T21:56:31.194Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/buyusedshopify/webApps/-/config  

[2020-01-10T21:56:31.197Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at Object.join (path.js:1147:7)
    at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:20:39)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:3:12)
    at Object.start (/usr/local/lib/node_modules/firebase-tools/lib/serve/functions.js:18:16)
    at /usr/local/lib/node_modules/firebase-tools/lib/serve/index.js:15:23
    at arrayMap (/usr/local/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:639:23)
    at Function.map (/usr/local/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:9554:14)
    at _serve (/usr/local/lib/node_modules/firebase-tools/lib/serve/index.js:13:26)
    at Command.module.exports.Command.description.option.option.option.option.before.action [as actionFn] (/usr/local/lib/node_modules/firebase-tools/lib/commands/serve.js:58:12)
    at Command.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/command.js:156:25)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/firebase-tools/lib/command.js:4:58)

Error: An unexpected error has occurred.

Кто-нибудь знает, что может быть причиной этого? Вот и моя база огня. json:

// firebase.json
{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint",
      "npm --prefix \"$RESOURCE_DIR\" run build"
    ]
  },
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  },
  "emulators": {
    "functions": {
      "port": 5001
    },
    "firestore": {
      "port": 8080
    },
    "hosting": {
      "port": 5000
    }
  }
}

...