The cloud function for the firebase FCM notification which was working fine with the earlier version of Node.js 8 but now as the node 8 is deprecated and needs to be updated, what changes should I make to the cloud function code, I have already installed Nodejs 14* on my machine
The only change you're absolutely required to make is not in your code at all. Minimally, you should edit your package.json and make sure that the target node version is 10:
"engines": {
"node": "10"
},
Simply redeploy the function to use the node 10 runtime.
Read more about migrating your functions to node 10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With