error parsing triggers
davisoqt opened this issue · comments
Hi when i try to deploy de functions i get this error "Error parsing triggers: Cannot find module 'firebase-functions'". log is this:
=== Deploying to 'firechat-dbb28'...
i deploying database, functions
i database: checking rules syntax...
✔ database: rules syntax for database firechat-dbb28 is valid
i functions: ensuring necessary APIs are enabled...
⚠ functions: missing necessary APIs. Enabling now...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error parsing triggers: Cannot find module 'firebase-functions'
Any helps please?
Can you run "npm install" inside "functions" directory ?
After that run again "firebase deploy"
Hi, i move forward with your suggestion but now im facing this:
npm WARN firebase-functions@1.1.0 requires a peer of firebase-admin@~5.12.1 but none was installed.
PC-IMP5:functions jorgedavid$ firebase deploy
=== Deploying to 'test-function-c887e'...
i deploying database, functions
i database: checking rules syntax...
✔ database: rules syntax for database test-function-c887e is valid
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error occurred while parsing your function triggers.
Error: Invalid Firebase app options passed as the first argument to initializeApp() for the app named "[DEFAULT]". The "credential" property must be an object which implements the Credential interface.
Any idea?
Chat21 Cloud function doesn't support Last Firebase CLI please read this :
"Install Firebase CLI running npm install -g firebase-tools@3.16.0. The project doesn't work with latest firebase cli (3.18.*) More info here https://firebase.google.com/docs/cli/ If the command fails, you may need to change npm permissions as described here https://docs.npmjs.com/getting-started/fixing-npm-permissions or try to install Firebase CLI locally with npm install firebase-tools@3.16.0"
Available here https://github.com/chat21/chat21-cloud-functions#pre-requisites
ok, the cloud function are upload in firebase. But now when i try your sample app and add my firebase config json to the app. i dont receive the message send by other phones. I missed some configuration? all the data send by phones are stored in the fire database. So i ghest that the cloud-function are not working.
even i try your sample app and no message sent are received.
Can i close the issue?
Yes