Error on Downloading and installing node: gzip: stdin: unexpected end of file
iammohssin opened this issue · 4 comments
Since today, the buildpack construction is failing during nodejs installation.
If was tried different nodejs versions, but I have the same error: gzip: stdin: unexpected end of file
-----> Building on the Heroku-20 stack
-----> Using buildpacks:
1. https://github.com/robgraeber/heroku-buildpack-nodejs-gulp.git
2. heroku/nodejs
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_PRODUCTION=true
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=development
NODE_MODULES_CACHE=true
npm scripts will see NODE_ENV=production (not 'development')
https://docs.npmjs.com/misc/config#production
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version (latest stable) via semver.io...
Downloading and installing node 18.4.0...
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
Thank you
Best regards,
Mohsin
Hi @iammohssin -- Is this still an issue for you? There was a period of time where our Node.js artifact mirror wasn't correctly mirroring some newer Node.js releases. We have since corrected the problem, and I suspect 18.4.0
installs correctly now for you.
The issue was the use of this old buildpack that's still using semver.io/s3pository:
That buildpack is third party and not supported - please use only the official heroku/nodejs
buildpack instead :-)
Apologies, but switching off the semver repository has completely broken our software for a week.
Semver.io has not been switched off (yet). You can see it running here:
https://semver.io
If the buildpack you are using no longer works, it's likely due to the sunset of s3pository, which was announced here:
https://devcenter.heroku.com/changelog-items/2454
This is unfortunately one of the risks you take by using buildpacks that are not official buildpacks. Have you tried asking the maintainer of the third party buildpack to fix it?
In most cases, I would recommend:
- Switching from the third party/unsupported buildpack to the official
heroku/nodejs
buildpack - If the other buildpack added extra things on top of the standard nodejs buildpack (for example running custom build steps), then make sure those steps are run too - likely by using https://devcenter.heroku.com/articles/nodejs-support#customizing-the-build-process
Doing (2) is generally pretty easy if you are familiar with your app -- if your app requires custom build steps you likely have to run those locally too (eg when developing/testing) - so in general it should be clear what they are. Failing that, you can read the README of the third party buildpack or look at its source code, to work out what custom steps it ran.
It sounds like the error you are seeing might be due to you not having done (2)?
How do we fix our app?
In broad strokes, I think the answer @edmorley gave in his option 2 is correct. We already have a Heroku support case going; we can get more specific about the solution for your app there.