justadudewhohacks / opencv4nodejs

Nodejs bindings to OpenCV 3 and OpenCV 4
MIT License
4.97k stars 828 forks source link

npm install opencv4nodejs on raspberry pi #547

Open Fermec28 opened 5 years ago

Fermec28 commented 5 years ago

Error Message

verbose fetch to= /tmp/npm-19421-Xaw-riH+/registry.npmjs.org/opencv-build/-/opencv-build-0.1.3.tgz 813 http GET https://registry.npmjs.org/opencv-build/-/opencv-build-0.1.3.tgz 814 http 200 https://registry.npmjs.org/opencv-build/-/opencv-build-0.1.3.tgz 815 silly lockFile f9d358da-ncv-build-opencv-build-0-1-3-tgz https://registry.npmjs.org/opencv-build/-/opencv-build-0.1.3.tgz 816 silly lockFile f9d358da-ncv-build-opencv-build-0-1-3-tgz https://registry.npmjs.org/opencv-build/-/opencv-build-0.1.3.tgz 817 silly lockFile 7586e13f-opencv-build-0-1-3 opencv-build@0.1.3 818 silly lockFile 7586e13f-opencv-build-0-1-3 opencv-build@0.1.3 819 silly lockFile b3dab74a-opencv-build-0-1-3 opencv-build@^0.1.3 820 silly lockFile b3dab74a-opencv-build-0-1-3 opencv-build@^0.1.3 821 http 405 https://registry.npmjs.org/types/node 822 silly registry.get cb [ 405, 822 silly registry.get { date: 'Thu, 02 May 2019 00:58:12 GMT', 822 silly registry.get 'content-type': 'application/json', 822 silly registry.get 'content-length': '63', 822 silly registry.get connection: 'close', 822 silly registry.get 'set-cookie': 822 silly registry.get [ '__cfduid=dd65f4f93fed23864a186c37b070f6b241556758691; expires=Fri, 01-May-20 00:58:11 GMT; path=/; domain=.registry.npmjs.org; HttpOnly' ], 822 silly registry.get 'cf-ray': '4d060b9d3eb5b558-BOG', 822 silly registry.get allow: 'PUT', 822 silly registry.get 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 822 silly registry.get vary: 'Accept-Encoding', 822 silly registry.get server: 'cloudflare' } ] 823 silly lockFile 4b8a0ab8-types-node-6 types/node@>6 824 silly lockFile 4b8a0ab8-types-node-6 types/node@>6 825 verbose about to build /home/pi/explorecar/explorer/node_modules/opencv4nodejs 826 verbose node_modules/opencv4nodejs unbuild 827 info preuninstall opencv4nodejs@4.15.0 828 info uninstall opencv4nodejs@4.15.0 829 verbose true,/home/pi/explorecar/explorer/node_modules,/home/pi/explorecar/explorer/node_modules unbuild opencv4nodejs@4.15.0 830 info postuninstall opencv4nodejs@4.15.0 831 error Error: Method Not Allowed 831 error at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10) 831 error at /usr/share/npm/lib/cache/add-named.js:203:12 831 error at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7) 831 error at FSReqWrap.oncomplete (fs.js:135:15) 832 error If you need help, you may report this entire log, 832 error including the npm and node versions, at: 832 error http://github.com/npm/npm/issues 833 error System Linux 4.14.71-v7+ 834 error command "/usr/bin/node" "/usr/bin/npm" "install" "--force" "--save" "opencv4nodejs" 835 error cwd /home/pi/explorecar/explorer 836 error node -v v8.11.1 837 error npm -v 1.4.21 838 error code E405 839 verbose exit [ 1, true ]

OpenCV version : 3.3.0

*With OpenCV-contrib? : yes

OS: Raspbian

dsanders11 commented 5 years ago

I just installed on Raspbian without any issues.

Judging by your error:

821 http 405 https://registry.npmjs.org/types/node

It looks like it was a network issue.

jhfoo commented 4 years ago

I just installed on Raspbian without any issues. What's your node and opencv build? I'm using the latest Raspbian image + Node 13.13.0 + opencv 4 (manual build) and my opencv4nodejs build failed.

make: *** [opencv4nodejs.target.mk:252: Release/obj.target/opencv4nodejs/cc/xfeatures2d/xfeatures2d.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [opencv4nodejs.target.mk:252: Release/obj.target/opencv4nodejs/cc/xfeatures2d/SIFTDetector.o] Error 1
In file included from /home/pi/dev/grey/server/node_modules/native-node-utils/src/utils.h:3,
                 from /home/pi/dev/grey/server/node_modules/native-node-utils/src/AbstractConverter.h:1,
                 from /home/pi/dev/grey/server/node_modules/native-node-utils/src/NativeNodeUtils.h:1,
                 from ../cc/macros.h:1,
                 from ../cc/opencv_modules.h:1,
                 from ../cc/xfeatures2d/SURFDetector.cc:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.97-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--jobs" "max"
gyp ERR! cwd /home/pi/dev/grey/server/node_modules/opencv4nodejs
gyp ERR! node -v v13.13.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
kirax999 commented 2 years ago

HELPPPPP

I have the same problem as the previous message impossible to install openCV