aws-lambda Cannot find module

前端 未结 12 712
野性不改
野性不改 2020-12-06 04:20

I keep getting this error in the aws-lambda console when uploading code from a zip file. I have tried uploading other zip files and they work correctly. The .js file is name

12条回答
  •  萌比男神i
    2020-12-06 05:14

    One possible problem is if you upload the lambda as a zip file created via PowerShell Compress-Archive. Compress-Archive has a bug which causes AWS to extract the files into a flat tree (no subdirectories), with backslashes in filenames:

提交回复
热议问题