Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
antonbabenko opened this issue Oct 22, 2022 · 8 comments · Fixed by #364
Closed

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

antonbabenko opened this issue Oct 22, 2022 · 8 comments · Fixed by #364

Comments

@antonbabenko
Copy link
Member

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.

@lorengordon
Copy link
Contributor

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.

@antonbabenko
Copy link
Member Author

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

@vemulkri
Copy link

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

@lorengordon
Copy link
Contributor

lorengordon commented Oct 24, 2022

@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
Copy link
Contributor

@antonbabenko Please see #364

lorengordon added a commit to lorengordon/terraform-aws-lambda that referenced this issue Oct 24, 2022
@vemulkri
Copy link

@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.

lorengordon added a commit to lorengordon/terraform-aws-lambda that referenced this issue Oct 26, 2022
@antonbabenko
Copy link
Member Author

This issue has been resolved in version 4.2.2 🎉

@github-actions
Copy link

github-actions bot commented Dec 1, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants