firebase-cli

Troubling with installing firebase-tools

半腔热情 提交于 2019-12-13 02:12:30
问题 After installing node and the npm, I tried installing firebase-tools on my computer (because cloud functions). This is what I see: npm WARN deprecated node-uuid@1.4.8: Use uuid module instead npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/firebase-tools/node_modules/

i functions: Your functions could not be parsed due to an issue with your node_modules (see above)

*爱你&永不变心* 提交于 2019-12-11 17:25:01
问题 In relation to this question I am trying to firebase emulators:start but I get the bellow output. Which when I type and press enter does nothing now. i Starting emulators: ["functions"] ⚠ Your requested "node" version "8" doesn't match your global version "12" ✔ functions: Emulator started at http://localhost:5001 i functions: Watching "/Users/username/Desktop/FinalAppPrjv2/firefunctions/functions" for Cloud Functions... ⚠ The Cloud Functions emulator requires the module "firebase-functions

Firebase RTDB: updating/merging new with old data from CLI

喜你入骨 提交于 2019-12-10 15:02:10
问题 I have multiple (big) JSON files that I want to add to Firebase Real-time Database (RTBD). I'm using Geofire, so all the children nodes need to be under the same parent. I'm storing static geo-data but I want to periodically refresh it in pieces. If I can't refresh it in pieces, it becomes problematic to always guarantee that the one big JSON I am updating with is always 100% complete. My desired data structure is like this: {"parent" : {"child_a" : 1, "child_b" : 2} Where my first JSON looks

Node.js version and Google Cloud functions

浪尽此生 提交于 2019-12-10 12:32:30
问题 I get this message when I start a local Firebase server with firebase serve : Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5. But there is no info about what to do. What do I need to do to downgrade Node.js to v6.11.5? Should I use that version just for Firebase projects and the latest released version of Node.js for other projects? In that case how to I do that? EDIT: The warning now looks like this and I am unable to run a new nearly empty project:

How to solve TypeError: functions.https.onCall is not a function?

邮差的信 提交于 2019-12-09 20:34:48
问题 I have a Firebase project that I've created earlier this year. It uses Cloud Functions to run some operations on the Realtime Database. Yesterday, I learned about the Callable Cloud Functions, so I decided to try it in my app to see if I should update my existing Functions or not. I've created a simple Cloud Function for testing purposes: exports.testCall = functions.https.onCall((data, context) =>{ console.log(context.auth.uid); return {response:"This means success"}; }); But when I try to

What's the reason for NPM Error on firebase deploy --only functions

[亡魂溺海] 提交于 2019-12-09 02:51:32
问题 I am recently getting this error when attempting to deploy my firebase functions. However, I didn't change any dependencies since last successful deploy... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading... i functions: packaged functions (57.25 KB) for uploading ✔ functions: functions folder uploaded successfully i functions: updating Node.js 6 function firestoreEmail(us-central1)... i functions: updating Node.js 6 function apiMain(us

How to deploy functions from other directory than '/functions'?

让人想犯罪 __ 提交于 2019-12-08 20:09:22
问题 David in his repo: https://github.com/davideast/react-ssr-firebase-hosting has the file with firebase functions index.js in the main root, not in the /functions directory. However, if I do the same and drop my index.js file to main root, if I do firebase deploy --only functions it says in the console: i deploying functions Error: functions\index.js does not exist, can't deploy Firebase Functions Q : How is it possible that he made it work? How can I do the same and deploy successfully

Firebase deploy returns error at tsc command

妖精的绣舞 提交于 2019-12-08 18:42:23
问题 I've setup a Firebase project to create some basic Firebase Functions. In the project I'm using TypeScript Following the Firebase official documentation I created my project. The last step, firebase deploy --only functions , gave an error with the tsc command. $ firebase deploy --only functions === Deploying to ‘my-project’… i deploying functions Running command: npm --prefix "$RESOURCE_DIR" run lint > functions@ lint /path/to/functions > tslint --project tsconfig.json Running command: npm -

Can't test cloud functions locally, emulator fails to start with TypeError: _onRequestWithOpts is not a function

给你一囗甜甜゛ 提交于 2019-12-06 19:46:01
问题 When I try to start the shell for local testing from the functions directory in my project, the emulator starts but my functions are not able to be loaded. When I run "npm run build" I receive no errors. What is happening? I have tried removing the functions directory and creating it again using the firebase-tools cli but I still get the same error. I have also exported the admin credentials. I'm using the default method created in the index.ts file generated from the firebase-tools cli.

Firebase CLI: “functions: WARNING! NO ENGINES FIELD FOUND IN PACKAGE.JSON. DEFAULTING TO NODE 6 RUNTIME.”

一曲冷凌霜 提交于 2019-12-05 18:35:50
问题 I upgraded my Firebase CLI to version 6.8.0. Now, when I deploy my functions, I get a warning message that looks like this: ⚠ functions: WARNING! NO ENGINES FIELD FOUND IN PACKAGE.JSON. DEFAULTING TO NODE 6 RUNTIME. Starting June 1, 2019 deployments will be blocked if no engines field is specified in package.json. To fix this, add the following lines to your package.json: "engines": { "node": "6" } What should I do to avoid this error message? 回答1: The nodejs 6 runtime on Cloud Functions is