docker-lambda
docker-lambda copied to clipboard
[GitHub Actions] Cannot find module 'color'
I'm using GitHub Actions to run integration tests against your Docker image. Locally on my MacBook everything works fine but when they run in my GitHub Actions workflow I get following response:
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'color'\nRequire stack:\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js"
}
My .github/workflows/build.yml looks like this:
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
lambda:
image: lambci/lambda:nodejs12.x
ports:
- 9001:9001
volumes:
- $PWD:/var/task:ro,delegated
env:
DOCKER_LAMBDA_STAY_OPEN: 1
AWS_LAMBDA_FUNCTION_HANDLER: lambda/my-test.handler
steps:
- ...