heroku-buildpack-nodejs: Error "/usr/bin/jq: Permission denied"
I did have a error today when was deploying using this package in the latest version(v176):
=====> Downloading Buildpack: https://github.com/gaffneyc/heroku-buildpack-jemalloc.git
=====> Detected Framework: jemalloc
-----> jemalloc: Vendoring 5.2.1
-----> jemalloc: Building runtime environment
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js
remote: /tmp/buildpackySeuL/lib/json.sh: line 5: /usr/bin/jq: Permission denied
remote: /tmp/buildpackySeuL/lib/json.sh: line 52: /usr/bin/jq: No such file or directory
remote: ! Unable to parse package.json
-----> Build failed
Then I changed my buildpack url to use v174(https://github.com/heroku/heroku-buildpack-nodejs.git#v174) and it worked fine.
I did not tried v175 because was recently as well.
Just reporting to give a solution to others that might have the same error.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 36
- Comments: 22 (12 by maintainers)
Commits related to this issue
- Set buildpack version to prevent error on deploy https://github.com/heroku/heroku-buildpack-nodejs/issues/856 — committed to thimo/team_plan by thimo 4 years ago
- Fixed build errors by updating dependencies Nodejs buildpack was failing with Error /usr/bin/jq Permission denied. I found this issue https://github.com/heroku/heroku-buildpack-nodejs/issues/856 The ... — committed to datasektionen/betting by mattiasgrenfeldt 4 years ago
- Fixed 'jq permission denied'-error when deploying to dokku Deploying to dokku gives Error /usr/bin/jq: Permission denied. The is an error with the buildpack included in dokku somehow. If you specify ... — committed to datasektionen/yoggi by mattiasgrenfeldt 4 years ago
- Pin nodejs buildpack to fix error on push See https://github.com/heroku/heroku-buildpack-nodejs/issues/856. — committed to bobwhitelock/todotxt-ui by bobwhitelock 3 years ago
- Try specifying node buildpack v175 https://github.com/heroku/heroku-buildpack-nodejs/issues/856 — committed to vulekamali/datamanager by jbothma 3 years ago
- Specify buildpack versions https://github.com/heroku/heroku-buildpack-nodejs/issues/856 — committed to datasektionen/pandora by elmaxe 2 years ago
For anyone coming here because they are using either Herokuish or Dokku, I’ve released a new version of those.
That aside, these buildpacks are - very graciously! - provided by Heroku/Salesforce. As such, here is a bit of food for thought:
v0.5.20was just released and should have an updated base image that pulls in JQ (our tests pass at least). Feel free to comment on gliderlabs/herokuish#617 if you still see issues.Apologies to the NodeJS buildpack maintainers for the noise from Herokuish. Thank you for continuing your work, it is very much appreciated.
Same as @EyeCode, I am using Dokku with .buildpacks file.
Would it be possible to wait until herokuish has
jqadded before removing it here? Many users at Gigalixir are running into this issue as we use herokuish.The
/usr/bindirectory is not user-writable unless the compile is run as root. I’ve added some possible solutions to: https://github.com/heroku/heroku-buildpack-nodejs/pull/854/files#r519781365To anyone hitting this issue – the underlying cause is that your Dokku base images don’t have
jqinstalled, and whilst the buildpack could choose to download jq as a temporary stop-gap (which it tries to do at present, but fails since/usr/binis not writeable), the better long term solution would be to update the Dokku base images to includejqfor parity with the Heroku stack images.Dunno for heroku, but im using dokku with .buildpacks file to list this buildpack and got the error if i dont put the version number at the end of github url
same for me! yesterday i started seeing this issue downgraded to v175 and that worked fine for me.
For us we are using the buildpack_url in gitlab, so its pointing right to the github as well. Downgrading to v175 worked for us
in my case is because im using dokku for testing my projects, when you’re using multiple buildpacks you should list them on a
.buildpacksfile. i got the node-js buildpack url from their docs, thats why im using the github url.Thanks ! https://github.com/heroku/heroku-buildpack-nodejs.git#v175 worked fine for us ! 😃
Sure… I’ll see how the issue progresses
A few things to note here:
latesttag. Please use this when referencing this buildpack if you want the most up-to-date releases when using the GitHub url.jq, so per https://github.com/heroku/heroku-buildpack-nodejs/pull/854 we removed the dependency from the buildpack. Since Dokku seems to use a “herokuish” stack image, the stack image of the build probably needs to be updated.Going to leave this open for a bit to give folks an opportunity to report if this resolves the issue.
@overallduka I hope you don’t mind, but I renamed your Issue because it was misleading. The issue is on
master, not onv176(as I explained above).