Repository navigation
Closed
Labels
Description
[REQUIRED] Environment info
firebase-tools: 8.2.0
Platform: macOS
[REQUIRED] Steps to reproduce
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.
Activity
google-oss-bot commentedon May 11, 2020
This issue does not seem to follow the issue template. Make sure you provide all the required information.
long1eu commentedon May 11, 2020
I switched back to 7.16.0 and now it works.
samtstern commentedon May 12, 2020
@long1eu can you show me your
firebase.jsonfile?long1eu commentedon May 12, 2020
@samedson So glad you got the Google job.
here it is:
samtstern commentedon May 12, 2020
@long1eu this looks a bit similar to #2112 even though I hope it's not related. A few more questions:
firestore.rulesandfirestore.indexes.jsonexist in the same directory as yourfirebase.jsonfile?functionsdirectory? If not can you runfirebase init functions?long1eu commentedon May 12, 2020
samtstern commentedon May 12, 2020
@long1eu ok did you try running
firebase init functions? or you could remove thefunctionspart of yourfirebase.json.long1eu commentedon May 12, 2020
I remove the
functionsfromfirebase.jsonand it works. Thank you so muchsamtstern commentedon May 12, 2020
@long1eu ok gonna mark this as a duplicate of #2112 then! Glad it's working for you.
monilpshah commentedon Apr 24, 2021
Thanks! It resolved my query. In my case functions directory has some problem. 'firebase init functions' solved my error