justadudewhohacks / justadudewhohacks/opencv4nodejs
Heroku CI build fails when adding opencv4nodejs, but normal app deploy build works
- Dominant language
- C++
- Stars
- 5.1k
- Forks
- 826
- PR merge metrics
- No merged PRs in 30d
Description
We are building an API on Heroku and have and we recently added opencv4nodejs and our Heroku CI build is now failing.
Works fine on development environment and also if we deploy using git push, but if we try to use Heroku CI build fails.
I've tried with and without the OPENCV4NODEJS_DISABLE_AUTOBUILD flag with no success. Also if I change the node/npm versions the deploy also seems to fail (unsure if it's related).
``` bash
-----> Fetching starkast/cmake buildpack...
buildpack downloaded
-----> Fetching https://github.com/onboardiq/heroku16-buildpack-opencv3.git buildpack...
buildpack downloaded
-----> Fetching heroku/nodejs buildpack...
buildpack downloaded
-----> CMake app detected
-----> Installing CMake version: 3.8.1
Downloading binary distribution
Verifying download
gpg: new configuration file `/app/.gnupg/gpg.conf' created
gpg: WARNING: options in `/app/.gnupg/gpg.conf' are not yet active during this run
...
-----> Creating environment variables.
cp: '/app/.heroku/cmake' and '/app/.heroku/cmake' are the same file
cp: '/app/.heroku/vendor' and '/app/.heroku/vendor' are the same file
cp: '/app/.profile.d/opencv.sh' and '/app/.profile.d/opencv.sh' are the same file
cp: '/app/.profile.d/sprettur.sh' and '/app/.profile.d/sprettur.sh' are the same file
-----> Node.js app detected
bash: /tmp/buildpacks/9bc901852117be66dc68068325767a3d2b8ee44665d854d905a7c1524cf353680e0850b0ce15a6f75047288aa1c0ddbec0154cab65cd63fa33e54f02a7b570b6/export: No such file or directory
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=test
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 8.11.4
engines.npm (package.json): 5.6.0
Resolving node version 8.11.4...
Downloading and installing node 8.11.4...
npm 5.6.0 already installed with node
-----> Building dependencies
Installing node modules (package.json + package-lock)
> opencv-build@0.0.15 install /app/node_modules/opencv-build
> node ./install.js
info install if you want to use an own OpenCV installation set OPENCV4NODEJS_DISABLE_AUTOBUILD
info install library dir does not exist: /app/node_modules/opencv-build/opencv/build/lib
info install running install script...
ERR! Error: Command failed: cmake --version
/bin/sh: 1: cmake: not found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv-build@0.0.15 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build@0.0.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.VAgJQ/_logs/2018-10-08T16_13_39_048Z-debug.log
-----> Build failed
```
Here is my app.json as per https://stackoverflow.com/a/51351494/5028937
``` json
{
"name": "myappname",
"scripts": {},
"env": {
"GOOGLE_MAPS_API_KEY": {
"required": true
},
"DATABASE_URL": {
"required": true
},
"OPENCV4NODEJS_DISABLE_AUTOBUILD": {
"required": true,
"value": 1
},
"OVERPASS_URL": {
"required": true
}
},
"formation": {
"web": {
"quantity": 1
}
},
"stack": "heroku-16",
"buildpacks": [{
"url": "starkast/cmake"
}, {
"url": "https://github.com/onboardiq/heroku16-buildpack-opencv3.git"
}, {
"url": "heroku/nodejs"
}]
}
```
I also posted this on [Stack Overflow](https://stackoverflow.com/questions/52706608/heroku-ci-build-fails-when-trying-to-add-opencv-but-app-deploy-works_)
Contributor guide
Assessment
This issue has not been assessed yet.