Heroku build failing on dependency install
Looks like there is some issue with prebuilt packages. It can work depending on Node.js version, latest version which is worked for me is 14.14.0
so try to setup it in your package.json
- v12.0.x succeeds
- v12.16.x fails
- v12.x.x fails
- v13.0.x succeeds
- v13.3.0 succeeds
- v13.x.x fails
- v14.0.x fails
- v14.1.x fails
- v14.14.0 succeeds
- v15.0.1 fails
More about this here https://github.com/Automattic/node-canvas/issues/1563#issuecomment-625149050
I had similar issue after my builds switched from Node v14.14.0 to v15.0.1 after recent release https://nodejs.org/en/blog/release/v15.0.1/
in addition to using a compatible node.js
version (I'm using 13.3.0
), I did two other things:
- installed
node-pre-gyp
which seemed to pre-build everything correctlynpm install node-pre-gyp@7.1.2
- set heroku stack to 18:
heroku stack:set heroku-18