amazon-api-gateway-url-shortener icon indicating copy to clipboard operation
amazon-api-gateway-url-shortener copied to clipboard

Amplify Console: while trigger a build

Open ishwarpawar21 opened this issue 3 years ago • 2 comments

While building code using Amplify getting following error.

17 error 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. 18 verbose exit [ 1, true ] 2021-05-19T12:16:42.475Z [ERROR]: !!! Build failed 2021-05-19T12:16:42.475Z [ERROR]: !!! Non-Zero Exit Code detected 2021-05-19T12:16:42.475Z [INFO]: # Starting environment caching... 2021-05-19T12:16:42.475Z [INFO]: # Environment caching completed

Thanks!

ishwarpawar21 avatar May 19 '21 18:05 ishwarpawar21

+1

moshfrid avatar Dec 13 '21 05:12 moshfrid

You can edit the Build file in Amplify and change the preBuild command to npm i instead of npm ci to get it working.

Or you can edit the template.yaml file to change the command as well.

image

esurdam avatar Apr 03 '22 05:04 esurdam