aws-lambda Cannot find module

前端 未结 12 715
野性不改
野性不改 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条回答
  •  Happy的楠姐
    2020-12-06 04:52

    Some library files might not have global Read so lambda will not be able to read to content and build the content.

    Make sure all files in node_modules are readable before packaging:

    chmod -R +r node_modules
    

    Then zip and upload.

提交回复
热议问题