firebase-tools: 8.2.0
Platform: macOS
When I run firebase deploy --only firestore:rules I get this error:
[debug] [2020-05-11T23:36:17.216Z] ----------------------------------------------------------------------
[debug] [2020-05-11T23:36:17.220Z] Command: /usr/local/bin/firebase /Users/long1eu/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/bin/firebase deploy --only firestore:rules
[debug] [2020-05-11T23:36:17.220Z] CLI Version: 8.2.0
[debug] [2020-05-11T23:36:17.220Z] Platform: darwin
[debug] [2020-05-11T23:36:17.221Z] Node Version: v12.16.1
[debug] [2020-05-11T23:36:17.222Z] Time: Tue May 12 2020 02:36:17 GMT+0300 (Eastern European Summer Time)
[debug] [2020-05-11T23:36:17.223Z] ----------------------------------------------------------------------
[debug] [2020-05-11T23:36:17.223Z]
[debug] [2020-05-11T23:36:17.238Z] > 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"]
[debug] [2020-05-11T23:36:17.239Z] > authorizing via signed-in user
[debug] [2020-05-11T23:36:17.239Z] [iam] checking project yitnow-dac3d for permissions ["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get"]
[debug] [2020-05-11T23:36:17.244Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/yitnow-dac3d:testIamPermissions
{"permissions":["datastore.indexes.create","datastore.indexes.delete","datastore.indexes.list","datastore.indexes.update","firebase.projects.get"]}
[debug] [2020-05-11T23:36:18.174Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 11 May 2020 23:36:18 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=821","alt-svc":"h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,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,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-05-11T23:36:18.289Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:117:11)
at Object.join (path.js:1039:7)
at Object.checkFunctionsSDKVersion [as fn] (/Users/long1eu/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:33:28)
at Command.<anonymous> (/Users/long1eu/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/command.js:159:30)
at Generator.next (<anonymous>)
at fulfilled (/Users/long1eu/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/command.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[error]
[error] Error: An unexpected error has occurred.
This issue does not seem to follow the issue template. Make sure you provide all the required information.
I switched back to 7.16.0 and now it works.
@long1eu can you show me your firebase.json file?
@samedson So glad you got the Google job.
here it is:
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
}
@long1eu this looks a bit similar to #2112 even though I hope it's not related. A few more questions:
firestore.rules and firestore.indexes.json exist in the same directory as your firebase.json file?functions directory? If not can you run firebase init functions?@long1eu ok did you try running firebase init functions? or you could remove the functions part of your firebase.json.
I remove the functions from firebase.json and it works. Thank you so much
@long1eu ok gonna mark this as a duplicate of #2112 then! Glad it's working for you.
Most helpful comment
I remove the
functionsfromfirebase.jsonand it works. Thank you so much