I have updated my Netlify function but it doesn’t appear to have updated. The code is still pointing to the old version and it’s been almost 24 hours. This is clear from looking at the logs. Do I need to wait longer? Is this normal every time I update the function? I have redeployed from the same commit twice using the UI but to no avail. It seemed to work very briefly as I received one email (the change I have made triggers an email) but it appeared to revert back after just one use.
Hey @amin-nejad ,
If the function changes are different enough to change the function file checksum, then we will upload the new version. So, one space added to the end of a line likely won’t update, but if you’re writing new console.log lines, that will update.
What do you see in the function logs when you POST to it now vs. what would you expect to see? We can’t see old function logs, and when I trigger the function from the UI, I get an error since I’m not sending the correct payload (though I do see success:false in the browser!). Thanks in advance for the additional info!
HI @jen, thanks for getting back to me! I definitely have new log messages and new functionality that sends an email on correct form submission so the checksum should have definitely been triggered. It all works locally (using netlify dev) but when pushing, the old unmodified function is still being used somehow as there are no emails and none of the new logs (denoting whether email send was successful or not).
I found another example where something like this appears to have happened:
and a fix was put in place. I don’t know if the two are related at all - I am also redirecting my function. I’ll try and push a new commit with just a trivial log message to re-trigger deployment and see if it the changes get reflected.
Hi @perry, sorry for the late reply. I think the problem is actually the part of the code where I use nodemailer. New console log messages in the code are indeed reflected in the logs. I’m not sure why nodemailer works locally but not in production. Do you have any idea what might be causing this? Thanks, Ali