terraform-aws-modules/terraform-aws-lambda

Code in examples/build-package is failing after #362 was merged

antonbabenko opened this issue · 8 comments

Description

As described in this comment, examples are failing.

Reproduction Steps

git checkout master
cd examples/build-package
terraform init
terraform apply

Error is like this:

│     raise RuntimeError(
│ RuntimeError: Nodejs interpreter version equal to defined lambda runtime (nodejs14.x) should be available in system PATH

Expected behavior

Examples should work as long as npm, pip, docker is installed.

/cc @lorengordon Could you take a look at this issue, please?

It is currently blocking #311 from testing and merging.

Ahh, I don't use nodejs, so I misinterpreted the apply-time code. The error message there says the "runtime" must be available in the PATH, but really it is npm that must be in the PATH...

npm_command = ['npm', 'install']

I can't get to it immediately, and tomorrow is unlikely, but maybe sometime Monday.

@lorengordon Monday is fine, too. Thank you very much! Have a great weekend!

seeing similar error, just posting for visibility. Thanks

RuntimeError: Python interpreter version equal to defined lambda runtime (python3.8) should be available in system PATH

@vemulkri Do you have python3.8 in your PATH? The problem this issue is about, is that it is looking for the command nodejs14.x but the command is npm. However, for python, the command should be the actual runtime, so python3.8 is the correct value.

@vemulkri Do you have python3.8 in your PATH? The problem this issue is about, is that it is looking for the command nodejs14.x but the command is npm. However, for python, the command should be the actual runtime, so python3.8 is the correct value.

@lorengordon Apologies, added specific runtime to path of my github actions and working as expected now. Thanks.

This issue has been resolved in version 4.2.2 🎉

I'm going to lock this issue because it has been closed for 30 days . This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.