Posts

Showing posts with the label google-cloud-functions

Node Js value not showing in notification when testing

Node Js value not showing in notification when testing I am making a notification using firebase cloud functions with node js and my app made on swift this is my payload var payload = { notification: { title: (goOfflineTimePeriod,"Inactive for minutes you are now offline"), body: "Time period for inactive log off can be changed in your settings" though my notification my notification only shows as; "Inactive for minutes you are now offline", "Time period for inactive log off can be changed in your settings" so the variable; goOfflineTimePeriod does not show in the notification I am only new to node js is there a reason why "goOfflineTimePeriod" does not show in the notification? here is my full node js function code; exports.goOfflineAlert = functions.firestore .document('/goneOffline/{uid}') .onCreate((snap, context) => { var db = admin.firestore(); var uid = context.params.uid; const newValu...

Firebase deploy errors starting with non-zero exit code (space in project path)

Firebase deploy errors starting with non-zero exit code (space in project path) I was having issues with firebase deploy command recently. After firebase deploy command all others were being deployed except firebase (storage, database etc) So I decided to reinstall firebase to fix this situation but after reinstall my problem got bigger. Now none of them are deployed with the following error: i deploying database, functions Running command: npm --prefix $RESOURCE_DIR run lint npm ERR! path C:UsersfarukGoogle DriveAndroidfirebase1$RESOURCE_DIRpackage.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open 'C:UsersfarukGoogle DriveAndroidfirebase1$RESOURCE_DIRpackage.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:UsersfarukAppDataRoamingnpm-cache_logs2018-01-24T18_21_34_878Z-debug.log Error: functions...