Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "path" argument must be of type string. Received undefined #2233

Closed
long1eu opened this issue May 11, 2020 · 10 comments
Closed

The "path" argument must be of type string. Received undefined #2233

long1eu opened this issue May 11, 2020 · 10 comments

Comments

@long1eu
Copy link

long1eu commented May 11, 2020

[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.
@google-oss-bot
Copy link
Contributor

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@long1eu
Copy link
Author

long1eu commented May 11, 2020

I switched back to 7.16.0 and now it works.

@samtstern
Copy link
Contributor

@long1eu can you show me your firebase.json file?

@samtstern samtstern added the Needs: Author Feedback Issues awaiting author feedback label May 12, 2020
@long1eu
Copy link
Author

long1eu commented May 12, 2020

@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"
    ]
  }
}

@google-oss-bot google-oss-bot added Needs: Attention and removed Needs: Author Feedback Issues awaiting author feedback labels May 12, 2020
@samtstern
Copy link
Contributor

@long1eu this looks a bit similar to #2112 even though I hope it's not related. A few more questions:

  • Do both firestore.rules and firestore.indexes.json exist in the same directory as your firebase.json file?
  • Do you have a functions directory? If not can you run firebase init functions?

@long1eu
Copy link
Author

long1eu commented May 12, 2020

  1. they are in the same directory
  2. I don't have a functions directory

@samtstern
Copy link
Contributor

@long1eu ok did you try running firebase init functions? or you could remove the functions part of your firebase.json.

@long1eu
Copy link
Author

long1eu commented May 12, 2020

I remove the functions from firebase.json and it works. Thank you so much

@samtstern
Copy link
Contributor

@long1eu ok gonna mark this as a duplicate of #2112 then! Glad it's working for you.

@monilpshah
Copy link

@long1eu this looks a bit similar to #2112 even though I hope it's not related. A few more questions:

  • Do both firestore.rules and firestore.indexes.json exist in the same directory as your firebase.json file?
  • Do you have a functions directory? If not can you run firebase init functions?

Thanks! It resolved my query. In my case functions directory has some problem. 'firebase init functions' solved my error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants