Bug: Building a NodeJS Lambda with husky in the "prepare" script fails #635
Labels
area/workflow/node_npm
blocked/close-if-inactive
Blocked for >14 days with no response, will be closed if still inactive after 7 days
Description:
My prepare script runs
husky
.When running
sam build
I'm getting a NpmPack error -After further investigation I found out that the culprit is this piece of code -
aws-lambda-builders/aws_lambda_builders/workflows/nodejs_npm/actions.py
Line 60 in bd8bd9e
It runs npm pack and pulls the last line which is supposed to be the packed file name, but
npm pack
appends to the last line also the error that husky produces in which it complaints it runs in a non git folder.As a workaround I added
husky > /dev/null 2>&1
to the prepare script.When running
npm pack
to simulate the issue I'm gettingSteps to reproduce:
Add
to your
package.json
Observed result:
Expected result:
Pack was successful, so I was expecting
NpmPack
to succeed as well. The only issue is the last line of the execution.Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
:1.113.0
eu-central-1
The text was updated successfully, but these errors were encountered: