aws-amplify / aws-amplify/amplify-cli

Provide consistent dependencies versions for lambda functions build

Open
#6,341 4 comments 0 reactions 0 assignees View on GitHub
feature-request functions ops-functions p3
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**
Because of how npm works sometimes when a lambda function is built it can update dependencies as a side effect even when the package-lock.json file is present, for automated builds like this `npm ci` should be used instead of `npm install` to provide clean and consistent dependencies versions.

**Describe the solution you'd like**
When building a lambda function package, detect whether package-lock.json is already present and if so use `npm ci` command instead of `npm install` to install dependencies.

**Additional context**
The proposed command is available in npm since version 5.7.0
It seems like rather simple change in the current code, and I should be able to make a pull request once this gets accepted.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.