I followed the following steps:
The Firebase CLI (Command Line Interface) requires Node.js and npm, which you can install by following the instructions on https
I went through the same issue recently, while performing Actions on Google Node.js Client Library Version 1 Migration Guide. to Node.js Client Library V2 (That I highly recommend) It took me a while to figure out what what was happening. At the I couldn't really figure out what the problem was! So here is what I did and it worked for me:
Make sure you have a backup copy of your cloud functions (index.js
) and maybe your package.json
(Just in case you don't want to remember what packages you previously had installed - Could be annoying sometimes).
Delete the entire functions directory from your project folder.
Re-launch firebase CLI with firebase init
and choose Functions
Once your cloud function have been initialized, CD into the functions folder and Redeploy it using firebase deploy --only functions
.
If everything goes well