firebase-tools: Can't deploy any functions to Cloud Functions by CLI v8.1.0
[REQUIRED] Environment info
firebase-tools: 8.1.0 Platform: macOS
[REQUIRED] Test case
N/A
[REQUIRED] Steps to reproduce
firebase deploy --only functions
[REQUIRED] Expected behavior
deploy like previous versions
[REQUIRED] Actual behavior
firebase deploy --only functions --debug
[2020-04-17T02:12:04.556Z] > 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-04-17T02:12:04.557Z] > authorizing via signed-in user
[2020-04-17T02:12:04.557Z] [iam] checking project jirawatee-108d7 for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]
[2020-04-17T02:12:04.560Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/jirawatee-108d7:testIamPermissions
{"permissions":["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]}
[2020-04-17T02:12:05.949Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Fri, 17 Apr 2020 02:12:07 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=1147","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,h3-T050=\":443\"; ma=2592000","accept-ranges":"none","transfer-encoding":"chunked"}
[2020-04-17T02:12:05.951Z] >>> HTTP REQUEST POST https://iam.googleapis.com/v1/projects/jirawatee-108d7/serviceAccounts/jirawatee-108d7@appspot.gserviceaccount.com:testIamPermissions
{"permissions":["iam.serviceAccounts.actAs"]}
[2020-04-17T02:12:07.788Z] <<< HTTP RESPONSE 200 {"content-type":"application/json; charset=UTF-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Fri, 17 Apr 2020 02:12:09 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,h3-T050=\":443\"; ma=2592000","accept-ranges":"none","transfer-encoding":"chunked"}
=== Deploying to 'jirawatee-108d7'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /Users/jirawatk/Documents/Git/Firebase/functions
> eslint .
✔ functions: Finished running predeploy script.
[2020-04-17T02:12:10.703Z] > [functions] package.json contents: {
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"@google-cloud/vision": "^1.11.0",
"child-process-promise": "^2.2.1",
"firebase-admin": "^8.10.0",
"firebase-functions": "^3.6.0",
"googleapis": "^49.0.0",
"mkdirp": "^1.0.4",
"mkdirp-promise": "^5.0.1",
"request": "^2.88.2",
"request-promise": "^4.2.5"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-plugin-promise": "^4.2.1"
},
"engines": {
"node": "8"
},
"private": true
}
[2020-04-17T02:12:10.705Z] Error: ENOENT: no such file or directory, stat 'functions/package.json'
at Object.statSync (fs.js:933:3)
at Object.load (/usr/local/lib/node_modules/firebase-tools/node_modules/cjson/index.js:200:12)
at getRuntimeChoice (/usr/local/lib/node_modules/firebase-tools/lib/parseRuntimeAndValidateSDK.js:55:26)
at module.exports (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/prepare.js:26:29)
at _chain (/usr/local/lib/node_modules/firebase-tools/lib/deploy/index.js:22:40)
at /usr/local/lib/node_modules/firebase-tools/lib/deploy/index.js:63:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: An unexpected error has occurred.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 11
- Comments: 15 (6 by maintainers)
Commits related to this issue
- Pass full path to getRuntimeChoice. Fixes #2138 — committed to firebase/firebase-tools by mbleigh 4 years ago
- Pass full path to getRuntimeChoice. Fixes #2138 (#2142) — committed to firebase/firebase-tools by mbleigh 4 years ago
It’s out! v8.1.1 shipped today.
Just to eliminate a possible issue – can you try running
firebase deployfrom the main project directory instead (where yourfirebase.jsonis)? I’m wondering if this is a relative directory problem.Hey @mbleigh, I am also having a similar issue when i try to execute
firebase deployfrom the ‘functions’ sub-directory. However, just wanted to let you know it seemed to work when run the command from the project’s root directory.It’s late evening where I am and we haven’t had widespread reports of issues so we will likely pick this up tomorrow. If you can provide me with more information that’d be very helpful, but also feel free to downgrade to the previous release to unblock yourself:
Hey, I am having the same issue while launching the deploy command from the
functionssubdir in a gitlab ci pipeline.@mbleigh thanks, specifying the version solves the issue. It appears then to be related with the last version.