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

Error: Command failed: npm -s ci --production --no-audit --prefix /tmp/build-lambda #537

Open
vikash-aquera opened this issue Jul 23, 2020 · 2 comments
Labels

Comments

@vikash-aquera
Copy link

Hi team,
We are trying to deploy using node-lambda. We are getting below error
node-lambda deploy -a $AWS_ACCESS_KEY_ID_LABS -s $AWS_SECRET_ACCESS_KEY_LABS -n "$AWS_FUNCTION_NAME"_Test -e "" -f deploy.env -o "$AWS_ROLE_DEV"
=> Moving files to temporary directory
=> Running npm ci --production
Error: Command failed: npm -s ci --production --no-audit --prefix /tmp/build-lambda
at ChildProcess.exithandler (child_process.js:303:12)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
at Process.onexit (/var/lang/lib/node_modules/node-lambda/node_modules/async-listener/glue.js:188:31) {
killed: false,
code: 1,
signal: null,
cmd: 'npm -s ci --production --no-audit --prefix /tmp/build-lambda'
}
This issue seems to be because of npm-shrinkwrap.json. It is not able to build when the package has npm-shrinkwrap.json
Please look into this issue. Deployment is failing into production so it is very critical for us.

@abetomo
Copy link
Contributor

abetomo commented Jul 23, 2020

What kind of error do you get if you run without the '-s' option?

npm ci --production --no-audit --prefix /tmp/build-lambda

@CodyPaul
Copy link

For me, this issue was that I did not have a package.json at the root of my lambda function index.js file. The lambda function did not have any dependent packages, but a package.json is still required. This was not an issue a few months ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants