Build command fails with: Build script returned non-zero exit code: 1

The last version to support NodeJS 13 was 26.6.1 as the pull request I linked bumped the version to 26.6.2.

Did you edit the package.json manually or run npm install pretty-format@26.6.1? If the former, then the v27 dependency is still in the package-lock.json or yarn.lock.

This is quite possible too.

If everything is working locally, you could build locally and deploy with Netlify CLI.

If you want to do the build on Netlify you would need to sort out the dependencies so they are all compatible with NodeJS v13, or update everything to work on (ideally) on v16 (though v14 above v14.16.0 is still supported.)

1 Like