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
demandé il y a 6 mois70 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions