The command returned a non-zero code 1

We’ve done nothing special to change this behaviour. There’s no reason for Netlify to trigger a change that would specifically affect a minor x.x.1 update in Node.js and break so many builds.

I’ve always used the NODE_VERSION as node in my Site Settings. So I have been using version 16.5.1+ much before it went into the “latest LTS” stage a few days ago and I’m having this issue since then.

To be clear, we’re not doing anything special with building packages or installing Node Modules. We’re simply calling npm install:

github.com//dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list \
  && apt-get update \
  && apt-get install -y --force-yes sbt \

  && sbt --version

At the end, I print the sbt version. 

If I let this last line my docker build fail with the following error : 

INFO[0061] The command [/bin/sh -c echo "deb //dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list   && apt-get update   && apt-get install -y --force-yes sbt   && sbt --version] returned a non-zero code: 1


If i remove this last line, my docker build is OK.


Why do "sbt --version" return a non-zero code ??

Jules

What is a non zero code?

Non-zero return codes are normally used for failure cases, with a zero return code used for a successful command, so this can give the impression that the command has failed when it has not.

How do I remove a docker image?

To remove the image, you first need to list all the images to get the Image IDs, Image name and other details. By running simple command docker images -a or docker images . After that you make sure which image want to remove, to do that executing this simple command docker rmi <your-image-id> .

Toplist

Latest post

TAGs