opencv4nodejs: Error installing on MacOS 10.12.6

Made a new folder, open in terminal, run npm install opencv4nodejs and throw all this and at the end exit code 1.

This is the output from terminal.

A lot of errors like this ⬇️ …/cc/modules/tracking/MultiTracker.cc:82:20: warning: comparison of integers of different signs: ‘int’ and ‘size_type’ (aka ‘unsigned long’) [-Wsign-compare] for (int i = 0; i < rects.size(); i++) { ~ ^ ~~~~~~~~~~~~ In file included from …/cc/modules/tracking/MultiTracker.cc:3: In file included from …/cc/modules/tracking/MultiTracker.h:2: In file included from /usr/local/include/opencv2/tracking.hpp:304: In file included from /usr/local/include/opencv2/tracking/tracker.hpp:45: In file included from /usr/local/include/opencv2/core.hpp:54: In file included from /usr/local/include/opencv2/core/base.hpp:58: In file included from /usr/local/include/opencv2/core/cvstd.hpp:1037: /usr/local/include/opencv2/core/ptr.inl.hpp:121:5: error: cannot initialize a member subobject of type ‘cv::Tracker *’ with an lvalue of type ‘const char *’ stored(p) ^ ~ …/cc/modules/tracking/MultiTracker.cc:37:63: note: in instantiation of function template specialization ‘cv::Ptrcv::Tracker::Ptr<const char>’ requested here bool ret = FF_UNWRAP(info.This(), MultiTracker)->tracker.add(“MIL”, image, boundingBox); ^ 3 warnings and 1 error generated. make: *** [Release/obj.target/opencv4nodejs/cc/modules/tracking/MultiTracker.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Darwin 16.7.0 gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /Users/carlos/node_modules/opencv4nodejs gyp ERR! node -v v6.10.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN enoent ENOENT: no such file or directory, open ‘/Users/carlos/package.json’ npm WARN carlos No description npm WARN carlos No repository field. npm WARN carlos No README data npm WARN carlos No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! opencv4nodejs@2.11.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the opencv4nodejs@2.11.0 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! /Users/carlos/.npm/_logs/2017-10-24T16_15_13_304Z-debug.log

This is the output in log file.

0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/local/bin/node’, 1 verbose cli ‘/usr/local/bin/npm’, 1 verbose cli ‘install’, 1 verbose cli ‘opencv4nodejs’ ] 2 info using npm@5.4.2 3 info using node@v6.10.3 4 verbose config Skipping project config: /Users/carlos/.npmrc. (matches userconfig) 5 verbose npm-session da2d7100235fd4e3 6 silly install loadCurrentTree 7 silly install readLocalPackageData 8 http fetch GET 200 https://registry.npmjs.org/opencv4nodejs 3889ms 9 silly pacote tag manifest for opencv4nodejs@latest fetched in 3929ms 10 silly install loadIdealTree 11 silly install cloneCurrentTreeToIdealTree 12 silly install loadShrinkwrap 13 silly install loadAllDepsIntoIdealTree 14 silly resolveWithNewModule opencv4nodejs@2.11.0 checking installable status 15 http fetch GET 304 https://registry.npmjs.org/macro-inferno 692ms (from cache) 16 silly pacote range manifest for macro-inferno@^0.2.1 fetched in 696ms 17 silly resolveWithNewModule macro-inferno@0.2.1 checking installable status 18 http fetch GET 200 https://registry.npmjs.org/nan 1955ms 19 silly pacote range manifest for nan@^2.7.0 fetched in 1958ms 20 silly resolveWithNewModule nan@2.7.0 checking installable status 21 silly currentTree carlos 21 silly currentTree ├── abbrev@1.1.1 21 silly currentTree ├── ajv@5.2.4 21 silly currentTree ├── ansi-regex@2.1.1 21 silly currentTree ├── aproba@1.2.0 21 silly currentTree ├── are-we-there-yet@1.1.4 21 silly currentTree ├── asn1@0.2.3 21 silly currentTree ├── assert-plus@1.0.0 21 silly currentTree ├── asynckit@0.4.0 21 silly currentTree ├── aws-sign2@0.7.0 21 silly currentTree ├── aws4@1.6.0 21 silly currentTree ├── balanced-match@1.0.0 21 silly currentTree ├── bcrypt-pbkdf@1.0.1 21 silly currentTree ├── block-stream@0.0.9 21 silly currentTree ├── boom@4.3.1 21 silly currentTree ├── brace-expansion@1.1.8 21 silly currentTree ├── caseless@0.12.0 21 silly currentTree ├── co@4.6.0 21 silly currentTree ├── code-point-at@1.1.0 21 silly currentTree ├── combined-stream@1.0.5 21 silly currentTree ├── concat-map@0.0.1 21 silly currentTree ├── console-control-strings@1.1.0 21 silly currentTree ├── core-util-is@1.0.2 21 silly currentTree ├─┬ cryptiles@3.1.2 21 silly currentTree │ └── boom@5.2.0 21 silly currentTree ├── dashdash@1.14.1 21 silly currentTree ├── delayed-stream@1.0.0 21 silly currentTree ├── delegates@1.0.0 21 silly currentTree ├── ecc-jsbn@0.1.1 21 silly currentTree ├── extend@3.0.1 21 silly currentTree ├── extsprintf@1.3.0 21 silly currentTree ├── fast-deep-equal@1.0.0 21 silly currentTree ├── forever-agent@0.6.1 21 silly currentTree ├── form-data@2.3.1 21 silly currentTree ├── fs.realpath@1.0.0 21 silly currentTree ├── fstream@1.0.11 21 silly currentTree ├── gauge@2.7.4 21 silly currentTree ├── getpass@0.1.7 21 silly currentTree ├── glob@7.1.2 21 silly currentTree ├── graceful-fs@4.1.11 21 silly currentTree ├── har-schema@2.0.0 21 silly currentTree ├── har-validator@5.0.3 21 silly currentTree ├── has-unicode@2.0.1 21 silly currentTree ├── hawk@6.0.2 21 silly currentTree ├── hoek@4.2.0 21 silly currentTree ├── http-signature@1.2.0 21 silly currentTree ├── inflight@1.0.6 21 silly currentTree ├── inherits@2.0.3 21 silly currentTree ├── is-fullwidth-code-point@1.0.0 21 silly currentTree ├── is-typedarray@1.0.0 21 silly currentTree ├── isarray@1.0.0 21 silly currentTree ├── isexe@2.0.0 21 silly currentTree ├── isstream@0.1.2 21 silly currentTree ├── jsbn@0.1.1 21 silly currentTree ├── json-schema-traverse@0.3.1 21 silly currentTree ├── json-schema@0.2.3 21 silly currentTree ├── json-stable-stringify@1.0.1 21 silly currentTree ├── json-stringify-safe@5.0.1 21 silly currentTree ├── jsonify@0.0.0 21 silly currentTree ├── jsprim@1.4.1 21 silly currentTree ├── mime-db@1.30.0 21 silly currentTree ├── mime-types@2.1.17 21 silly currentTree ├── minimatch@3.0.4 21 silly currentTree ├── minimist@0.0.8 21 silly currentTree ├── mkdirp@0.5.1 21 silly currentTree ├── node-gyp@3.6.2 21 silly currentTree ├── nopt@3.0.6 21 silly currentTree ├── npmlog@4.1.2 21 silly currentTree ├── number-is-nan@1.0.1 21 silly currentTree ├── oauth-sign@0.8.2 21 silly currentTree ├── object-assign@4.1.1 21 silly currentTree ├── once@1.4.0 21 silly currentTree ├── optimist@0.3.7 21 silly currentTree ├── os-homedir@1.0.2 21 silly currentTree ├── os-tmpdir@1.0.2 21 silly currentTree ├── osenv@0.1.4 21 silly currentTree ├── path-is-absolute@1.0.1 21 silly currentTree ├── performance-now@2.1.0 21 silly currentTree ├── process-nextick-args@1.0.7 21 silly currentTree ├── punycode@1.4.1 21 silly currentTree ├── qs@6.5.1 21 silly currentTree ├── readable-stream@2.3.3 21 silly currentTree ├── rebuild@0.1.2 21 silly currentTree ├── request@2.83.0 21 silly currentTree ├── rimraf@2.6.2 21 silly currentTree ├── safe-buffer@5.1.1 21 silly currentTree ├── semver@5.3.0 21 silly currentTree ├── set-blocking@2.0.0 21 silly currentTree ├── signal-exit@3.0.2 21 silly currentTree ├── sntp@2.0.2 21 silly currentTree ├── sshpk@1.13.1 21 silly currentTree ├── string_decoder@1.0.3 21 silly currentTree ├── string-width@1.0.2 21 silly currentTree ├── stringstream@0.0.5 21 silly currentTree ├── strip-ansi@3.0.1 21 silly currentTree ├── tar@2.2.1 21 silly currentTree ├── tough-cookie@2.3.3 21 silly currentTree ├── tunnel-agent@0.6.0 21 silly currentTree ├── tweetnacl@0.14.5 21 silly currentTree ├── util-deprecate@1.0.2 21 silly currentTree ├── uuid@3.1.0 21 silly currentTree ├── verror@1.10.0 21 silly currentTree ├── which@1.3.0 21 silly currentTree ├── wide-align@1.1.2 21 silly currentTree ├── wordwrap@0.0.3 21 silly currentTree └── wrappy@1.0.2 22 silly idealTree carlos 22 silly idealTree ├── abbrev@1.1.1 22 silly idealTree ├── ajv@5.2.4 22 silly idealTree ├── ansi-regex@2.1.1 22 silly idealTree ├── aproba@1.2.0 22 silly idealTree ├── are-we-there-yet@1.1.4 22 silly idealTree ├── asn1@0.2.3 22 silly idealTree ├── assert-plus@1.0.0 22 silly idealTree ├── asynckit@0.4.0 22 silly idealTree ├── aws-sign2@0.7.0 22 silly idealTree ├── aws4@1.6.0 22 silly idealTree ├── balanced-match@1.0.0 22 silly idealTree ├── bcrypt-pbkdf@1.0.1 22 silly idealTree ├── block-stream@0.0.9 22 silly idealTree ├── boom@4.3.1 22 silly idealTree ├── brace-expansion@1.1.8 22 silly idealTree ├── caseless@0.12.0 22 silly idealTree ├── co@4.6.0 22 silly idealTree ├── code-point-at@1.1.0 22 silly idealTree ├── combined-stream@1.0.5 22 silly idealTree ├── concat-map@0.0.1 22 silly idealTree ├── console-control-strings@1.1.0 22 silly idealTree ├── core-util-is@1.0.2 22 silly idealTree ├─┬ cryptiles@3.1.2 22 silly idealTree │ └── boom@5.2.0 22 silly idealTree ├── dashdash@1.14.1 22 silly idealTree ├── delayed-stream@1.0.0 22 silly idealTree ├── delegates@1.0.0 22 silly idealTree ├── ecc-jsbn@0.1.1 22 silly idealTree ├── extend@3.0.1 22 silly idealTree ├── extsprintf@1.3.0 22 silly idealTree ├── fast-deep-equal@1.0.0 22 silly idealTree ├── forever-agent@0.6.1 22 silly idealTree ├── form-data@2.3.1 22 silly idealTree ├── fs.realpath@1.0.0 22 silly idealTree ├── fstream@1.0.11 22 silly idealTree ├── gauge@2.7.4 22 silly idealTree ├── getpass@0.1.7 22 silly idealTree ├── glob@7.1.2 22 silly idealTree ├── graceful-fs@4.1.11 22 silly idealTree ├── har-schema@2.0.0 22 silly idealTree ├── har-validator@5.0.3 22 silly idealTree ├── has-unicode@2.0.1 22 silly idealTree ├── hawk@6.0.2 22 silly idealTree ├── hoek@4.2.0 22 silly idealTree ├── http-signature@1.2.0 22 silly idealTree ├── inflight@1.0.6 22 silly idealTree ├── inherits@2.0.3 22 silly idealTree ├── is-fullwidth-code-point@1.0.0 22 silly idealTree ├── is-typedarray@1.0.0 22 silly idealTree ├── isarray@1.0.0 22 silly idealTree ├── isexe@2.0.0 22 silly idealTree ├── isstream@0.1.2 22 silly idealTree ├── jsbn@0.1.1 22 silly idealTree ├── json-schema-traverse@0.3.1 22 silly idealTree ├── json-schema@0.2.3 22 silly idealTree ├── json-stable-stringify@1.0.1 22 silly idealTree ├── json-stringify-safe@5.0.1 22 silly idealTree ├── jsonify@0.0.0 22 silly idealTree ├── jsprim@1.4.1 22 silly idealTree ├── macro-inferno@0.2.1 22 silly idealTree ├── mime-db@1.30.0 22 silly idealTree ├── mime-types@2.1.17 22 silly idealTree ├── minimatch@3.0.4 22 silly idealTree ├── minimist@0.0.8 22 silly idealTree ├── mkdirp@0.5.1 22 silly idealTree ├── nan@2.7.0 22 silly idealTree ├── node-gyp@3.6.2 22 silly idealTree ├── nopt@3.0.6 22 silly idealTree ├── npmlog@4.1.2 22 silly idealTree ├── number-is-nan@1.0.1 22 silly idealTree ├── oauth-sign@0.8.2 22 silly idealTree ├── object-assign@4.1.1 22 silly idealTree ├── once@1.4.0 22 silly idealTree ├── opencv4nodejs@2.11.0 22 silly idealTree ├── optimist@0.3.7 22 silly idealTree ├── os-homedir@1.0.2 22 silly idealTree ├── os-tmpdir@1.0.2 22 silly idealTree ├── osenv@0.1.4 22 silly idealTree ├── path-is-absolute@1.0.1 22 silly idealTree ├── performance-now@2.1.0 22 silly idealTree ├── process-nextick-args@1.0.7 22 silly idealTree ├── punycode@1.4.1 22 silly idealTree ├── qs@6.5.1 22 silly idealTree ├── readable-stream@2.3.3 22 silly idealTree ├── rebuild@0.1.2 22 silly idealTree ├── request@2.83.0 22 silly idealTree ├── rimraf@2.6.2 22 silly idealTree ├── safe-buffer@5.1.1 22 silly idealTree ├── semver@5.3.0 22 silly idealTree ├── set-blocking@2.0.0 22 silly idealTree ├── signal-exit@3.0.2 22 silly idealTree ├── sntp@2.0.2 22 silly idealTree ├── sshpk@1.13.1 22 silly idealTree ├── string_decoder@1.0.3 22 silly idealTree ├── string-width@1.0.2 22 silly idealTree ├── stringstream@0.0.5 22 silly idealTree ├── strip-ansi@3.0.1 22 silly idealTree ├── tar@2.2.1 22 silly idealTree ├── tough-cookie@2.3.3 22 silly idealTree ├── tunnel-agent@0.6.0 22 silly idealTree ├── tweetnacl@0.14.5 22 silly idealTree ├── util-deprecate@1.0.2 22 silly idealTree ├── uuid@3.1.0 22 silly idealTree ├── verror@1.10.0 22 silly idealTree ├── which@1.3.0 22 silly idealTree ├── wide-align@1.1.2 22 silly idealTree ├── wordwrap@0.0.3 22 silly idealTree └── wrappy@1.0.2 23 silly install generateActionsToTake 24 silly diffTrees action count 3 25 silly diffTrees add nan@2.7.0 26 silly diffTrees add macro-inferno@0.2.1 27 silly diffTrees add opencv4nodejs@2.11.0 28 silly decomposeActions action count 24 29 silly decomposeActions fetch nan@2.7.0 30 silly decomposeActions extract nan@2.7.0 31 silly decomposeActions preinstall nan@2.7.0 32 silly decomposeActions build nan@2.7.0 33 silly decomposeActions install nan@2.7.0 34 silly decomposeActions postinstall nan@2.7.0 35 silly decomposeActions finalize nan@2.7.0 36 silly decomposeActions refresh-package-json nan@2.7.0 37 silly decomposeActions fetch macro-inferno@0.2.1 38 silly decomposeActions extract macro-inferno@0.2.1 39 silly decomposeActions preinstall macro-inferno@0.2.1 40 silly decomposeActions build macro-inferno@0.2.1 41 silly decomposeActions install macro-inferno@0.2.1 42 silly decomposeActions postinstall macro-inferno@0.2.1 43 silly decomposeActions finalize macro-inferno@0.2.1 44 silly decomposeActions refresh-package-json macro-inferno@0.2.1 45 silly decomposeActions fetch opencv4nodejs@2.11.0 46 silly decomposeActions extract opencv4nodejs@2.11.0 47 silly decomposeActions preinstall opencv4nodejs@2.11.0 48 silly decomposeActions build opencv4nodejs@2.11.0 49 silly decomposeActions install opencv4nodejs@2.11.0 50 silly decomposeActions postinstall opencv4nodejs@2.11.0 51 silly decomposeActions finalize opencv4nodejs@2.11.0 52 silly decomposeActions refresh-package-json opencv4nodejs@2.11.0 53 silly install executeActions 54 silly doSerial global-install 24 55 verbose correctMkdir /Users/carlos/.npm/_locks correctMkdir not in flight; initializing 56 verbose lock using /Users/carlos/.npm/_locks/staging-301e76cb75dfd0b8.lock for /Users/carlos/node_modules/.staging 57 silly doParallel extract 24 58 silly extract nan@2.7.0 59 silly extract macro-inferno@0.2.1 60 silly extract opencv4nodejs@2.11.0 61 silly doReverseSerial unbuild 24 62 silly doSerial remove 24 63 silly doSerial move 24 64 silly doSerial finalize 24 65 silly finalize /Users/carlos/node_modules/nan 66 silly finalize /Users/carlos/node_modules/macro-inferno 67 silly finalize /Users/carlos/node_modules/opencv4nodejs 68 silly doParallel refresh-package-json 24 69 silly refresh-package-json /Users/carlos/node_modules/nan 70 silly refresh-package-json /Users/carlos/node_modules/macro-inferno 71 silly refresh-package-json /Users/carlos/node_modules/opencv4nodejs 72 silly doParallel preinstall 24 73 silly preinstall nan@2.7.0 74 info lifecycle nan@2.7.0~preinstall: nan@2.7.0 75 silly preinstall macro-inferno@0.2.1 76 info lifecycle macro-inferno@0.2.1~preinstall: macro-inferno@0.2.1 77 silly preinstall opencv4nodejs@2.11.0 78 info lifecycle opencv4nodejs@2.11.0~preinstall: opencv4nodejs@2.11.0 79 silly doSerial build 24 80 silly build nan@2.7.0 81 info linkStuff nan@2.7.0 82 silly linkStuff nan@2.7.0 has /Users/carlos/node_modules as its parent node_modules 83 verbose linkBins nan@2.7.0 84 verbose linkMans nan@2.7.0 85 silly build macro-inferno@0.2.1 86 info linkStuff macro-inferno@0.2.1 87 silly linkStuff macro-inferno@0.2.1 has /Users/carlos/node_modules as its parent node_modules 88 verbose linkBins macro-inferno@0.2.1 89 verbose linkMans macro-inferno@0.2.1 90 silly build opencv4nodejs@2.11.0 91 info linkStuff opencv4nodejs@2.11.0 92 silly linkStuff opencv4nodejs@2.11.0 has /Users/carlos/node_modules as its parent node_modules 93 verbose linkBins opencv4nodejs@2.11.0 94 verbose linkMans opencv4nodejs@2.11.0 95 silly doSerial global-link 24 96 silly doParallel update-linked 24 97 silly doSerial install 24 98 silly install nan@2.7.0 99 info lifecycle nan@2.7.0~install: nan@2.7.0 100 silly install macro-inferno@0.2.1 101 info lifecycle macro-inferno@0.2.1~install: macro-inferno@0.2.1 102 silly install opencv4nodejs@2.11.0 103 info lifecycle opencv4nodejs@2.11.0~install: opencv4nodejs@2.11.0 104 verbose lifecycle opencv4nodejs@2.11.0~install: unsafe-perm in lifecycle true 105 verbose lifecycle opencv4nodejs@2.11.0~install: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/carlos/node_modules/opencv4nodejs/node_modules/.bin:/Users/carlos/node_modules/.bin:/usr/local/ant/bin:/usr/local/apache-ant/bin:/Users/carlos/.rvm/gems/ruby-2.4.1/bin:/Users/carlos/.rvm/gems/ruby-2.4.1@global/bin:/Users/carlos/.rvm/rubies/ruby-2.4.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/carlos/.nexustools:/Users/carlos/.rvm/bin:/Users/carlos/.rvm/bin 106 verbose lifecycle opencv4nodejs@2.11.0~install: CWD: /Users/carlos/node_modules/opencv4nodejs 107 silly lifecycle opencv4nodejs@2.11.0~install: Args: [ ‘-c’, ‘node-gyp rebuild’ ] 108 silly lifecycle opencv4nodejs@2.11.0~install: Returned: code: 1 signal: null 109 info lifecycle opencv4nodejs@2.11.0~install: Failed to exec install script 110 verbose unlock done using /Users/carlos/.npm/_locks/staging-301e76cb75dfd0b8.lock for /Users/carlos/node_modules/.staging 111 warn enoent ENOENT: no such file or directory, open ‘/Users/carlos/package.json’ 112 verbose enoent This is related to npm not being able to find a file. 113 warn carlos No description 114 warn carlos No repository field. 115 warn carlos No README data 116 warn carlos No license field. 117 verbose stack Error: opencv4nodejs@2.11.0 install: node-gyp rebuild 117 verbose stack Exit status 1 117 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16) 117 verbose stack at emitTwo (events.js:106:13) 117 verbose stack at EventEmitter.emit (events.js:191:7) 117 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 117 verbose stack at emitTwo (events.js:106:13) 117 verbose stack at ChildProcess.emit (events.js:191:7) 117 verbose stack at maybeClose (internal/child_process.js:886:16) 117 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 118 verbose pkgid opencv4nodejs@2.11.0 119 verbose cwd /Users/carlos/Downloads/opencv4nodejs1 120 verbose Darwin 16.7.0 121 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “opencv4nodejs” 122 verbose node v6.10.3 123 verbose npm v5.4.2 124 error code ELIFECYCLE 125 error errno 1 126 error opencv4nodejs@2.11.0 install: node-gyp rebuild 126 error Exit status 1 127 error Failed at the opencv4nodejs@2.11.0 install script. 127 error This is probably not a problem with npm. There is likely additional logging output above. 128 verbose exit [ 1, true ]

Hope you can help, you have made a great job here and i want to try it.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, i ran and all the examples worked just great! Great job you made and thanks for your help! …

PD: simpleTracking1.js example just didn’t work, but thats another topic…

@muhammadsamir11 Did you get this error from npm install? I think your error is not related to this issue, could you open a new issue and append the npm log?