0

I am deploying the code build first time. I am getting the below error when deploying the code in the server. The pipeline shows succeeded when code merged but when running npm ci in codebuild it throw an error.

[Container] 2021/06/14 12:44:52 Running command npm ci npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.

swati srivastav
  • 635
  • 4
  • 15

1 Answers1

1

Looks like you'll need to generate the package-lock.json so that the command can succeed. See this answer for instructions on how to generate that file.Generate that file and check it into source code and then try re-running your build. As the error suggests, you'll need npm 5 or later although the answer I linked to is for npm 6 or 7.

jstewart379
  • 436
  • 4
  • 9