Error: Digest method not supported
I add this line in my file index.js :
const crypto = require('crypto');
and after add , try upload function give me error this :

Why are you giving me this error firebase !
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @ghost-bullet. I'm unable to reproduce the issue with the following code
const crypto = require('crypto');
const functions = require("firebase-functions");
const handleAnalyticsEvent = async (event) => {
console.log(event.params);
};
exports.onArticleOpen = functions.analytics.event('in_app_purchase').onLog(handleAnalyticsEvent);
Can you try running node index.js on your file to see if no error occurs? If you are see the same error message, you might have a bug in your code unrelated to the Functions SDK.
Hey @ghost-bullet. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@ghost-bullet if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.