-
-
Notifications
You must be signed in to change notification settings - Fork 711
[support] how to install deps for node.js function? #62
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
Comments
I'm having the exact same issue. Looking at the code that is responsible for parsing the commands, I do not see how it could possibly work: https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/package.py#L654-L695 Walking through that:
absolutely nothing is done. Am I mis-reading this or is this particular feature broken? |
Alright. Parsing the code it seems, this does work, however you must explicitly pass a pseudo command to force zip file creation. So the correct source_path is: source_path = [
{
path = "src"
commands = [
"npm install",
":zip ."
]
}] @Art3mK and I were confused, because all the examples that mention |
Fixed/improved by #62. Thanks, @chrislwade ! |
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. |
Hey,
tried today to deploy lambda using this module, but I can't get that working, I have following config
lambda function code is located in module directory in
src
subdir, which contains index.js and package.json files, I'm using terragrunt, running on macOS laptop, terragrunt log:Not sure what I'm doing wrong. If I add that
src
path to source_path list as first item, then build archive contains all files from that folder, butnpm install
never executes. What's wrong?Thanks.
The text was updated successfully, but these errors were encountered: