我正在尝试将Express Node.Js应用程序部署到Heroku,但是在构建阶段遇到OpenCV问题。我正在使用opencv4nodejs。
我在Heroku NodeJS app using OpenCV处遇到与此线程相同的问题,并且还尝试了几种不同类型的OpenCV Heroku构建包,并按照该答案的说明进行操作后,我似乎仍然无法使其正常工作。 / p>
这是我的package.json
:
{
"name": "open-cv-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": "9.5.0",
"npm": "4.6.1"
},
"author": "",
"license": "ISC",
"dependencies": {
"async": "^2.6.1",
"aws-sdk": "^2.272.1",
"cheerio": "^1.0.0-rc.2",
"compromise": "^11.11.0",
"express": "^4.16.3",
"google-spreadsheet": "^2.0.5",
"moment": "^2.22.2",
"opencv4nodejs": "^4.6.1",
"q": "^1.5.1",
"request": "^2.87.0",
"request-promise": "^4.2.2",
"rss-feed-emitter": "^2.0.0",
"sharp": "^0.20.5",
"underscore": "^1.9.1",
"underscore.string": "^3.3.4",
"winston": "^2.3.0"
}
}
以下是尝试git push
到Heroku的日志:
My-Macbook:open-cv-project guy$ git push staging
Counting objects: 37, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (36/36), done.
Writing objects: 100% (37/37), 47.67 MiB | 643.00 KiB/s, done.
Total 37 (delta 20), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> opencv app detected
remote: -----> Fetching and caching OpenCV (a4c8444d7bae2a219b4ea9cb68919637)
remote: -----> Vendoring OpenCV shared objects into slug
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 9.5.0
remote: engines.npm (package.json): 4.6.1
remote:
remote: Resolving node version 9.5.0...
remote: Downloading and installing node 9.5.0...
remote: Bootstrapping npm 4.6.1 (replacing 5.6.0)...
remote: npm 4.6.1 installed
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (new-signature)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > opencv-build@0.0.14 install /tmp/build_d2fff4256863b9d50ec7ab06c3b8e915/node_modules/opencv-build
remote: > node ./install.js
remote:
remote: info install if you want to use an own OpenCV installation set OPENCV4NODEJS_DISABLE_AUTOBUILD
remote: info install library dir does not exist: /tmp/build_d2fff4256863b9d50ec7ab06c3b8e915/node_modules/opencv-build/opencv/build/lib
remote: info install running install script...
remote: ERR! Error: Command failed: cmake --version
remote: /bin/sh: 1: cmake: not found
remote:
remote: hidden-rides-scraper@1.0.0 /tmp/build_d2fff4256863b9d50ec7ab06c3b8e915
remote: ├─┬ async@2.6.1
remote: │ └── lodash@4.17.10
remote: ├─┬ aws-sdk@2.275.1
remote: │ ├─┬ buffer@4.9.1
remote: │ │ ├── base64-js@1.3.0
remote: │ │ ├── ieee754@1.1.8 deduped
remote: │ │ └── isarray@1.0.0
remote: │ ├── events@1.1.1
remote: │ ├── ieee754@1.1.8
remote: │ ├── jmespath@0.15.0
remote: │ ├── querystring@0.2.0
remote: │ ├── sax@1.2.1
remote: │ ├─┬ url@0.10.3
remote: │ │ ├── punycode@1.3.2
remote: │ │ └── querystring@0.2.0 deduped
remote: │ ├── uuid@3.1.0
remote: │ └─┬ xml2js@0.4.19
remote: │ ├── sax@1.2.1 deduped
remote: │ └── xmlbuilder@9.0.7
remote: ├─┬ cheerio@1.0.0-rc.2
remote: │ ├─┬ css-select@1.2.0
remote: │ │ ├── boolbase@1.0.0
remote: │ │ ├── css-what@2.1.0
remote: │ │ ├─┬ domutils@1.5.1
remote: │ │ │ ├── dom-serializer@0.1.0 deduped
remote: │ │ │ └── domelementtype@1.3.0 deduped
remote: │ │ └─┬ nth-check@1.0.1
remote: │ │ └── boolbase@1.0.0 deduped
remote: │ ├─┬ dom-serializer@0.1.0
remote: │ │ ├── domelementtype@1.1.3
remote: │ │ └── entities@1.1.1 deduped
remote: │ ├── entities@1.1.1
remote: │ ├─┬ htmlparser2@3.9.2
remote: │ │ ├── domelementtype@1.3.0
remote: │ │ ├─┬ domhandler@2.4.2
remote: │ │ │ └── domelementtype@1.3.0 deduped
remote: │ │ ├── domutils@1.5.1 deduped
remote: │ │ ├── entities@1.1.1 deduped
remote: │ │ ├── inherits@2.0.3
remote: │ │ └─┬ readable-stream@2.3.6
remote: │ │ ├── core-util-is@1.0.2
remote: │ │ ├── inherits@2.0.3 deduped
remote: │ │ ├── isarray@1.0.0 deduped
remote: │ │ ├── process-nextick-args@2.0.0
remote: │ │ ├── safe-buffer@5.1.2 deduped
remote: │ │ ├─┬ string_decoder@1.1.1
remote: │ │ │ └── safe-buffer@5.1.2 deduped
remote: │ │ └── util-deprecate@1.0.2 deduped
remote: │ ├── lodash@4.17.10 deduped
remote: │ └─┬ parse5@3.0.3
remote: │ └── @types/node@10.5.2
remote: ├─┬ compromise@11.11.0
remote: │ └── efrt-unpack@2.0.3
remote: ├─┬ express@4.16.3
remote: │ ├─┬ accepts@1.3.5
remote: │ │ ├── mime-types@2.1.18 deduped
remote: │ │ └── negotiator@0.6.1
remote: │ ├── array-flatten@1.1.1
remote: │ ├─┬ body-parser@1.18.2
remote: │ │ ├── bytes@3.0.0
remote: │ │ ├── content-type@1.0.4 deduped
remote: │ │ ├── debug@2.6.9 deduped
remote: │ │ ├── depd@1.1.2 deduped
remote: │ │ ├─┬ http-errors@1.6.3
remote: │ │ │ ├── depd@1.1.2 deduped
remote: │ │ │ ├── inherits@2.0.3 deduped
remote: │ │ │ ├── setprototypeof@1.1.0 deduped
remote: │ │ │ └── statuses@1.4.0 deduped
remote: │ │ ├── iconv-lite@0.4.19
remote: │ │ ├── on-finished@2.3.0 deduped
remote: │ │ ├── qs@6.5.1 deduped
remote: │ │ ├─┬ raw-body@2.3.2
remote: │ │ │ ├── bytes@3.0.0 deduped
remote: │ │ │ ├─┬ http-errors@1.6.2
remote: │ │ │ │ ├── depd@1.1.1
remote: │ │ │ │ ├── inherits@2.0.3 deduped
remote: │ │ │ │ ├── setprototypeof@1.0.3
remote: │ │ │ │ └── statuses@1.4.0 deduped
remote: │ │ │ ├── iconv-lite@0.4.19 deduped
remote: │ │ │ └── unpipe@1.0.0 deduped
remote: │ │ └── type-is@1.6.16 deduped
remote: │ ├── content-disposition@0.5.2
remote: │ ├── content-type@1.0.4
remote: │ ├── cookie@0.3.1
remote: │ ├── cookie-signature@1.0.6
remote: │ ├─┬ debug@2.6.9
remote: │ │ └── ms@2.0.0
remote: │ ├── depd@1.1.2
remote: │ ├── encodeurl@1.0.2
remote: │ ├── escape-html@1.0.3
remote: │ ├── etag@1.8.1
remote: │ ├─┬ finalhandler@1.1.1
remote: │ │ ├── debug@2.6.9 deduped
remote: │ │ ├── encodeurl@1.0.2 deduped
remote: │ │ ├── escape-html@1.0.3 deduped
remote: │ │ ├── on-finished@2.3.0 deduped
remote: │ │ ├── parseurl@1.3.2 deduped
remote: │ │ ├── statuses@1.4.0 deduped
remote: │ │ └── unpipe@1.0.0
remote: │ ├── fresh@0.5.2
remote: │ ├── merge-descriptors@1.0.1
remote: │ ├── methods@1.1.2
remote: │ ├─┬ on-finished@2.3.0
remote: │ │ └── ee-first@1.1.1
remote: │ ├── parseurl@1.3.2
remote: │ ├── path-to-regexp@0.1.7
remote: │ ├─┬ proxy-addr@2.0.3
remote: │ │ ├── forwarded@0.1.2
remote: │ │ └── ipaddr.js@1.6.0
remote: │ ├── qs@6.5.1
remote: │ ├── range-parser@1.2.0
remote: │ ├── safe-buffer@5.1.1
remote: │ ├─┬ send@0.16.2
remote: │ │ ├── debug@2.6.9 deduped
remote: │ │ ├── depd@1.1.2 deduped
remote: │ │ ├── destroy@1.0.4
remote: │ │ ├── encodeurl@1.0.2 deduped
remote: │ │ ├── escape-html@1.0.3 deduped
remote: │ │ ├── etag@1.8.1 deduped
remote: │ │ ├── fresh@0.5.2 deduped
remote: │ │ ├── http-errors@1.6.3 deduped
remote: │ │ ├── mime@1.4.1
remote: │ │ ├── ms@2.0.0 deduped
remote: │ │ ├── on-finished@2.3.0 deduped
remote: │ │ ├── range-parser@1.2.0 deduped
remote: │ │ └── statuses@1.4.0 deduped
remote: │ ├─┬ serve-static@1.13.2
remote: │ │ ├── encodeurl@1.0.2 deduped
remote: │ │ ├── escape-html@1.0.3 deduped
remote: │ │ ├── parseurl@1.3.2 deduped
remote: │ │ └── send@0.16.2 deduped
remote: │ ├── setprototypeof@1.1.0
remote: │ ├── statuses@1.4.0
remote: │ ├─┬ type-is@1.6.16
remote: │ │ ├── media-typer@0.3.0
remote: │ │ └── mime-types@2.1.18 deduped
remote: │ ├── utils-merge@1.0.1
remote: │ └── vary@1.1.2
remote: ├─┬ google-spreadsheet@2.0.5
remote: │ ├── async@1.5.2
remote: │ ├─┬ google-auth-library@0.10.0
remote: │ │ ├─┬ gtoken@1.2.3
remote: │ │ │ ├─┬ google-p12-pem@0.1.2
remote: │ │ │ │ └── node-forge@0.7.5
remote: │ │ │ ├── jws@3.1.5 deduped
remote: │ │ │ ├── mime@1.4.1 deduped
remote: │ │ │ └── request@2.87.0 deduped
remote: │ │ ├─┬ jws@3.1.5
remote: │ │ │ ├─┬ jwa@1.1.6
remote: │ │ │ │ ├── buffer-equal-constant-time@1.0.1
remote: │ │ │ │ ├─┬ ecdsa-sig-formatter@1.0.10
remote: │ │ │ │ │ └── safe-buffer@5.1.2 deduped
remote: │ │ │ │ └── safe-buffer@5.1.2 deduped
remote: │ │ │ └── safe-buffer@5.1.2 deduped
remote: │ │ ├── lodash.noop@3.0.1
remote: │ │ └── request@2.87.0 deduped
remote: │ ├── lodash@3.10.1
remote: │ ├── request@2.87.0 deduped
remote: │ └── xml2js@0.4.19 deduped
remote: ├── moment@2.22.2
remote: ├── q@1.5.1
remote: ├─┬ request@2.87.0
remote: │ ├── aws-sign2@0.7.0
remote: │ ├── aws4@1.7.0
remote: │ ├── caseless@0.12.0
remote: │ ├─┬ combined-stream@1.0.6
remote: │ │ └── delayed-stream@1.0.0
remote: │ ├── extend@3.0.1
remote: │ ├── forever-agent@0.6.1
remote: │ ├─┬ form-data@2.3.2
remote: │ │ ├── asynckit@0.4.0
remote: │ │ ├── combined-stream@1.0.6 deduped
remote: │ │ └── mime-types@2.1.18 deduped
remote: │ ├─┬ har-validator@5.0.3
remote: │ │ ├─┬ ajv@5.5.2
remote: │ │ │ ├── co@4.6.0
remote: │ │ │ ├── fast-deep-equal@1.1.0
remote: │ │ │ ├── fast-json-stable-stringify@2.0.0
remote: │ │ │ └── json-schema-traverse@0.3.1
remote: │ │ └── har-schema@2.0.0
remote: │ ├─┬ http-signature@1.2.0
remote: │ │ ├── assert-plus@1.0.0
remote: │ │ ├─┬ jsprim@1.4.1
remote: │ │ │ ├── assert-plus@1.0.0 deduped
remote: │ │ │ ├── extsprintf@1.3.0
remote: │ │ │ ├── json-schema@0.2.3
remote: │ │ │ └─┬ verror@1.10.0
remote: │ │ │ ├── assert-plus@1.0.0 deduped
remote: │ │ │ ├── core-util-is@1.0.2 deduped
remote: │ │ │ └── extsprintf@1.3.0 deduped
remote: │ │ └─┬ sshpk@1.14.2
remote: │ │ ├── asn1@0.2.3
remote: │ │ ├── assert-plus@1.0.0 deduped
remote: │ │ ├─┬ bcrypt-pbkdf@1.0.2
remote: │ │ │ └── tweetnacl@0.14.5 deduped
remote: │ │ ├─┬ dashdash@1.14.1
remote: │ │ │ └── assert-plus@1.0.0 deduped
remote: │ │ ├─┬ ecc-jsbn@0.1.1
remote: │ │ │ └── jsbn@0.1.1 deduped
remote: │ │ ├─┬ getpass@0.1.7
remote: │ │ │ └── assert-plus@1.0.0 deduped
remote: │ │ ├── jsbn@0.1.1
remote: │ │ ├── safer-buffer@2.1.2
remote: │ │ └── tweetnacl@0.14.5
remote: │ ├── is-typedarray@1.0.0
remote: │ ├── isstream@0.1.2
remote: │ ├── json-stringify-safe@5.0.1
remote: │ ├─┬ mime-types@2.1.18
remote: │ │ └── mime-db@1.33.0
remote: │ ├── oauth-sign@0.8.2
remote: │ ├── performance-now@2.1.0
remote: │ ├── qs@6.5.1 deduped
remote: │ ├── safe-buffer@5.1.2
remote: │ ├─┬ tough-cookie@2.3.4
remote: │ │ └── punycode@1.4.1
remote: │ ├─┬ tunnel-agent@0.6.0
remote: │ │ └── safe-buffer@5.1.2 deduped
remote: │ └── uuid@3.1.0 deduped
remote: ├─┬ request-promise@4.2.2
remote: │ ├── bluebird@3.5.1
remote: │ ├─┬ request-promise-core@1.1.1
remote: │ │ └── lodash@4.17.10 deduped
remote: │ ├── stealthy-require@1.1.1
remote: │ └── tough-cookie@2.3.4 deduped
remote: ├─┬ rss-feed-emitter@2.0.0
remote: │ ├── bluebird@3.0.5
remote: │ ├─┬ feedparser@1.1.4
remote: │ │ ├── addressparser@0.1.3
remote: │ │ ├── array-indexofobject@0.0.1
remote: │ │ ├─┬ readable-stream@1.0.34
remote: │ │ │ ├── core-util-is@1.0.2 deduped
remote: │ │ │ ├── inherits@2.0.3 deduped
remote: │ │ │ ├── isarray@0.0.1
remote: │ │ │ └── string_decoder@0.10.31
remote: │ │ └── sax@0.6.1
remote: │ ├── lodash@4.17.5
remote: │ ├─┬ request@2.83.0
remote: │ │ ├── aws-sign2@0.7.0 deduped
remote: │ │ ├── aws4@1.7.0 deduped
remote: │ │ ├── caseless@0.12.0 deduped
remote: │ │ ├── combined-stream@1.0.6 deduped
remote: │ │ ├── extend@3.0.1 deduped
remote: │ │ ├── forever-agent@0.6.1 deduped
remote: │ │ ├── form-data@2.3.2 deduped
remote: │ │ ├── har-validator@5.0.3 deduped
remote: │ │ ├─┬ hawk@6.0.2
remote: │ │ │ ├─┬ boom@4.3.1
remote: │ │ │ │ └── hoek@4.2.1 deduped
remote: │ │ │ ├─┬ cryptiles@3.1.2
remote: │ │ │ │ └─┬ boom@5.2.0
remote: │ │ │ │ └── hoek@4.2.1 deduped
remote: │ │ │ ├── hoek@4.2.1
remote: │ │ │ └─┬ sntp@2.1.0
remote: │ │ │ └── hoek@4.2.1 deduped
remote: │ │ ├── http-signature@1.2.0 deduped
remote: │ │ ├── is-typedarray@1.0.0 deduped
remote: │ │ ├── isstream@0.1.2 deduped
remote: │ │ ├── json-stringify-safe@5.0.1 deduped
remote: │ │ ├── mime-types@2.1.18 deduped
remote: │ │ ├── oauth-sign@0.8.2 deduped
remote: │ │ ├── performance-now@2.1.0 deduped
remote: │ │ ├── qs@6.5.1 deduped
remote: │ │ ├── safe-buffer@5.1.2 deduped
remote: │ │ ├── stringstream@0.0.6
remote: │ │ ├── tough-cookie@2.3.4 deduped
remote: │ │ ├── tunnel-agent@0.6.0 deduped
remote: │ │ └── uuid@3.1.0 deduped
remote: │ └── tiny-emitter@1.0.1
remote: ├─┬ sharp@0.20.5
remote: │ ├─┬ color@3.0.0
remote: │ │ ├─┬ color-convert@1.9.2
remote: │ │ │ └── color-name@1.1.1
remote: │ │ └─┬ color-string@1.5.2
remote: │ │ ├── color-name@1.1.1 deduped
remote: │ │ └─┬ simple-swizzle@0.2.2
remote: │ │ └── is-arrayish@0.3.2
remote: │ ├── detect-libc@1.0.3
remote: │ ├── fs-copy-file-sync@1.1.1
remote: │ ├── nan@2.10.0
remote: │ ├─┬ npmlog@4.1.2
remote: │ │ ├─┬ are-we-there-yet@1.1.5
remote: │ │ │ ├── delegates@1.0.0
remote: │ │ │ └── readable-stream@2.3.6 deduped
remote: │ │ ├── console-control-strings@1.1.0
remote: │ │ ├─┬ gauge@2.7.4
remote: │ │ │ ├── aproba@1.2.0
remote: │ │ │ ├── console-control-strings@1.1.0 deduped
remote: │ │ │ ├── has-unicode@2.0.1
remote: │ │ │ ├── object-assign@4.1.1
remote: │ │ │ ├── signal-exit@3.0.2
remote: │ │ │ ├─┬ string-width@1.0.2
remote: │ │ │ │ ├── code-point-at@1.1.0
remote: │ │ │ │ ├─┬ is-fullwidth-code-point@1.0.0
remote: │ │ │ │ │ └── number-is-nan@1.0.1
remote: │ │ │ │ └── strip-ansi@3.0.1 deduped
remote: │ │ │ ├─┬ strip-ansi@3.0.1
remote: │ │ │ │ └── ansi-regex@2.1.1
remote: │ │ │ └─┬ wide-align@1.1.3
remote: │ │ │ └── string-width@1.0.2 deduped
remote: │ │ └── set-blocking@2.0.0
remote: │ ├─┬ prebuild-install@4.0.0
remote: │ │ ├── detect-libc@1.0.3 deduped
remote: │ │ ├── expand-template@1.1.1
remote: │ │ ├── github-from-package@0.0.0
remote: │ │ ├── minimist@1.2.0
remote: │ │ ├─┬ mkdirp@0.5.1
remote: │ │ │ └── minimist@0.0.8
remote: │ │ ├─┬ node-abi@2.4.3
remote: │ │ │ └── semver@5.5.0 deduped
remote: │ │ ├── noop-logger@0.1.1
remote: │ │ ├── npmlog@4.1.2 deduped
remote: │ │ ├── os-homedir@1.0.2
remote: │ │ ├─┬ pump@2.0.1
remote: │ │ │ ├─┬ end-of-stream@1.4.1
remote: │ │ │ │ └── once@1.4.0 deduped
remote: │ │ │ └── once@1.4.0 deduped
remote: │ │ ├─┬ rc@1.2.8
remote: │ │ │ ├── deep-extend@0.6.0
remote: │ │ │ ├── ini@1.3.5
remote: │ │ │ ├── minimist@1.2.0 deduped
remote: │ │ │ └── strip-json-comments@2.0.1
remote: │ │ ├── simple-get@2.8.1 deduped
remote: │ │ ├─┬ tar-fs@1.16.3
remote: │ │ │ ├── chownr@1.0.1 deduped
remote: │ │ │ ├── mkdirp@0.5.1 deduped
remote: │ │ │ ├─┬ pump@1.0.3
remote: │ │ │ │ ├── end-of-stream@1.4.1 deduped
remote: │ │ │ │ └── once@1.4.0 deduped
remote: │ │ │ └─┬ tar-stream@1.6.1
remote: │ │ │ ├─┬ bl@1.2.2
remote: │ │ │ │ ├── readable-stream@2.3.6 deduped
remote: │ │ │ │ └── safe-buffer@5.1.2 deduped
remote: │ │ │ ├─┬ buffer-alloc@1.2.0
remote: │ │ │ │ ├── buffer-alloc-unsafe@1.1.0
remote: │ │ │ │ └── buffer-fill@1.0.0
remote: │ │ │ ├── end-of-stream@1.4.1 deduped
remote: │ │ │ ├── fs-constants@1.0.0
remote: │ │ │ ├── readable-stream@2.3.6 deduped
remote: │ │ │ ├── to-buffer@1.1.1
remote: │ │ │ └── xtend@4.0.1
remote: │ │ ├── tunnel-agent@0.6.0 deduped
remote: │ │ └── which-pm-runs@1.0.0
remote: │ ├── semver@5.5.0
remote: │ ├─┬ simple-get@2.8.1
remote: │ │ ├─┬ decompress-response@3.3.0
remote: │ │ │ └── mimic-response@1.0.1
remote: │ │ ├─┬ once@1.4.0
remote: │ │ │ └── wrappy@1.0.2
remote: │ │ └── simple-concat@1.0.0
remote: │ ├─┬ tar@4.4.4
remote: │ │ ├── chownr@1.0.1
remote: │ │ ├─┬ fs-minipass@1.2.5
remote: │ │ │ └── minipass@2.3.3 deduped
remote: │ │ ├─┬ minipass@2.3.3
remote: │ │ │ ├── safe-buffer@5.1.2 deduped
remote: │ │ │ └── yallist@3.0.2 deduped
remote: │ │ ├─┬ minizlib@1.1.0
remote: │ │ │ └── minipass@2.3.3 deduped
remote: │ │ ├── mkdirp@0.5.1 deduped
remote: │ │ ├── safe-buffer@5.1.2 deduped
remote: │ │ └── yallist@3.0.2
remote: │ └── tunnel-agent@0.6.0 deduped
remote: ├── underscore@1.9.1
remote: ├─┬ underscore.string@3.3.4
remote: │ ├── sprintf-js@1.1.1
remote: │ └── util-deprecate@1.0.2
remote: └─┬ winston@2.4.3
remote: ├── async@1.0.0
remote: ├── colors@1.0.3
remote: ├── cycle@1.0.3
remote: ├── eyes@0.1.8
remote: ├── isstream@0.1.2 deduped
remote: └── stack-trace@0.0.10
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! opencv-build@0.0.14 install: `node ./install.js`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the opencv-build@0.0.14 install script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.s30Rg/_logs/2018-07-15T17_55_57_804Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
我还运行了heroku run bash
来尝试通过Heroku服务器上的npm install opencv4nodejs
手动尝试安装,并看到此错误:
~ $ npm install opencv4nodejs
> opencv-build@0.0.14 install /app/node_modules/opencv-build
> node ./install.js
info install OPENCV4NODEJS_DISABLE_AUTOBUILD is set
info install skipping auto build...
> opencv4nodejs@4.6.1 install /app/node_modules/opencv4nodejs
> node-gyp rebuild
make: Entering directory '/app/node_modules/opencv4nodejs/build'
CXX(target) Release/obj.target/opencv4nodejs/cc/opencv4nodejs.o
make: g++: Command not found
opencv4nodejs.target.mk:195: recipe for target 'Release/obj.target/opencv4nodejs/cc/opencv4nodejs.o' failed
make: *** [Release/obj.target/opencv4nodejs/cc/opencv4nodejs.o] Error 127
make: Leaving directory '/app/node_modules/opencv4nodejs/build'
不胜感激!
答案 0 :(得分:4)
经过大量的坚持,终于找到了解决方案,所以回答了我自己的问题:
如果您的堆栈为heroku-16
,则这些是您要添加的Heroku构建包(按此特定顺序!):