Lambda function sharp library "__dirname is not defined in ES module scope"

0

I have a lambda repo set up locally which works fine without a sharp package which I need for the actual use case. After adding sharp package and executing the function, I am getting the error __dirname is not defined in ES module scope. I didn't find anything useful in my day long search. Attaching the repo https://github.com/trsiddiqui/lambda-image-optimization

trsid
已提問 6 個月前檢視次數 71 次