AWS Lambda Error: “Cannot find module '/var/task/index'”

后端 未结 9 1704
忘掉有多难
忘掉有多难 2020-12-23 02:54

Node.js Alexa Task Issue

I\'m currently coding a Node.js Alexa Task via AWS Lambda, and I have been trying to code a function that receives informat

9条回答
  •  北海茫月
    2020-12-23 03:15

    I got this error when I was using lambci/lambda:nodejs8.10 in windows.

    I'd tried all of the solution listed above but none of which could help me deal with my issue(even though the error stack look the same as the question).

    Here is my simple solution:

    1. using --entrypoint flag to run a container to find out if the file is mounted into the container. It turns out I may got the share drive issue with my Docker Desktop.
    2. I switched my docker daemon that day before, but everything works fine except this problem.
    3. Anyway, remount my drive to Docker Desktop, you can both use the docker command or just open the Docker Desktop setting to apply.

提交回复
热议问题