node-opencv icon indicating copy to clipboard operation
node-opencv copied to clipboard

npm install opencv fails with "node-pre-gyp install --fallback-to-build"

Open tsboom opened this issue 10 years ago • 29 comments

Hello, I've searched far and wide on this forum, and on stack overflow for a way to solve this problem.

I have node version 4.6.1 npm version 3.10.9

OpenCV 2.4.13.1 was installed with brew at: /usr/local/Cellar

I'm trying to npm install opencv, but I get these errors:

C02QQKAQFVH5:~ TS98257$ sudo npm install opencv
Password:

> [email protected] install /Users/TS98257/node_modules/opencv
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v46-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp) 
/Users/TS98257/node_modules/opencv/utils/find-opencv.js:21
                throw new Error("ERROR: failed to run: pkg-config", opencv, flag);
                ^

Error: ERROR: failed to run: pkg-config
    at /Users/TS98257/node_modules/opencv/utils/find-opencv.js:21:23
    at ChildProcess.exithandler (child_process.js:220:5)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:829:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:486:12)
gyp: Call to 'node utils/find-opencv.js --cflags' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/opt/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/TS98257/node_modules/opencv/build/opencv/v6.0.0/Release/node-v46-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/TS98257/node_modules/opencv/build/opencv/v6.0.0/Release/node-v46-darwin-x64"
gyp ERR! cwd /Users/TS98257/node_modules/opencv
gyp ERR! node -v v4.6.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp configure --fallback-to-build --module=/Users/TS98257/node_modules/opencv/build/opencv/v6.0.0/Release/node-v46-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/TS98257/node_modules/opencv/build/opencv/v6.0.0/Release/node-v46-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/TS98257/node_modules/opencv/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:829:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Darwin 14.5.0
node-pre-gyp ERR! command "/opt/local/bin/node" "/Users/TS98257/node_modules/opencv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/TS98257/node_modules/opencv
node-pre-gyp ERR! node -v v4.6.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp configure --fallback-to-build --module=/Users/TS98257/node_modules/opencv/build/opencv/v6.0.0/Release/node-v46-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/TS98257/node_modules/opencv/build/opencv/v6.0.0/Release/node-v46-darwin-x64' (1)
npm WARN enoent ENOENT: no such file or directory, open '/Users/TS98257/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/TS98257/node_modules/sshpk/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/TS98257/node_modules/rc/package.json'
npm WARN TS98257 No description
npm WARN TS98257 No repository field.
npm WARN TS98257 No README data
npm WARN TS98257 No license field.
npm WARN In [email protected] replacing bundled version of node-pre-gyp with [email protected]
npm ERR! Darwin 14.5.0
npm ERR! argv "/opt/local/bin/node" "/usr/local/bin/npm" "install" "opencv"
npm ERR! node v4.6.1
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the opencv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs opencv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls opencv
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/TS98257/npm-debug.log

I'm not sure what I'm doing wrong.

From what I've gathered, it has to do with my pkg-config. , however I followed the steps

My .bashrc file says this: PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH

Can anyone help?

tsboom avatar Nov 29 '16 20:11 tsboom

Same problem.

NodeJS - v5.5.0 npm - v4.0.2 MacOS - 10.11.3


> [email protected] install /Projects/NodeJS/opencv/node_modules/opencv
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v47-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v47 ABI) (falling back to source compile with node-gyp) 
/Projects/NodeJS/opencv/node_modules/opencv/utils/find-opencv.js:21
                throw new Error("ERROR: failed to run: pkg-config", opencv, flag);
                ^

Error: ERROR: failed to run: pkg-config
    at /Projects/NodeJS/opencv/node_modules/opencv/utils/find-opencv.js:21:23
    at ChildProcess.exithandler (child_process.js:220:5)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:821:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:469:12)
gyp: Call to 'node utils/find-opencv.js --cflags' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Projects/NodeJS/opencv/node_modules/opencv/build/opencv/v6.0.0/Release/node-v47-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Projects/NodeJS/opencv/node_modules/opencv/build/opencv/v6.0.0/Release/node-v47-darwin-x64"
gyp ERR! cwd /Projects/NodeJS/opencv/node_modules/opencv
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Projects/NodeJS/opencv/node_modules/opencv/build/opencv/v6.0.0/Release/node-v47-darwin-x64/opencv.node --module_name=opencv --module_path=/Projects/NodeJS/opencv/node_modules/opencv/build/opencv/v6.0.0/Release/node-v47-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Projects/NodeJS/opencv/node_modules/opencv/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:100:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:821:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Darwin 15.3.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Projects/NodeJS/opencv/node_modules/opencv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Projects/NodeJS/opencv/node_modules/opencv
node-pre-gyp ERR! node -v v5.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Projects/NodeJS/opencv/node_modules/opencv/build/opencv/v6.0.0/Release/node-v47-darwin-x64/opencv.node --module_name=opencv --module_path=/Projects/NodeJS/opencv/node_modules/opencv/build/opencv/v6.0.0/Release/node-v47-darwin-x64' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN In [email protected] replacing bundled version of node-pre-gyp with [email protected]
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "opencv" "--save"
npm ERR! node v5.5.0
npm ERR! npm  v4.0.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the opencv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs opencv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls opencv
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Projects/NodeJS/opencv/npm-debug.log

jaymehtasa avatar Dec 01 '16 11:12 jaymehtasa

I have the same issue:

craig:node-opencv Craig$ npm install

> [email protected] install /Users/Craig/node-opencv
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v51-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI) (falling back to source compile with node-gyp) 
/Users/Craig/node-opencv/utils/find-opencv.js:21
                throw new Error("ERROR: failed to run: pkg-config", opencv, flag);
                ^

Error: ERROR: failed to run: pkg-config
    at /Users/Craig/node-opencv/utils/find-opencv.js:21:23
    at ChildProcess.exithandler (child_process.js:218:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)
gyp: Call to 'node utils/find-opencv.js --cflags' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
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.1.0
gyp ERR! command "/usr/local/Cellar/node/7.2.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/Craig/node-opencv/build/opencv/v6.0.0/Release/node-v51-darwin-x64/opencv.node" "--module_name=opencv" "--module_path=/Users/Craig/node-opencv/build/opencv/v6.0.0/Release/node-v51-darwin-x64"
gyp ERR! cwd /Users/Craig/node-opencv
gyp ERR! node -v v7.2.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp configure --fallback-to-build --module=/Users/Craig/node-opencv/build/opencv/v6.0.0/Release/node-v51-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/Craig/node-opencv/build/opencv/v6.0.0/Release/node-v51-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Craig/node-opencv/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:885:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.1.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/7.2.0/bin/node" "/Users/Craig/node-opencv/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/Craig/node-opencv
node-pre-gyp ERR! node -v v7.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp configure --fallback-to-build --module=/Users/Craig/node-opencv/build/opencv/v6.0.0/Release/node-v51-darwin-x64/opencv.node --module_name=opencv --module_path=/Users/Craig/node-opencv/build/opencv/v6.0.0/Release/node-v51-darwin-x64' (1)

npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.2.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.2.0
npm ERR! npm  v4.0.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the opencv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs opencv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls opencv
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Craig/node-opencv/npm-debug.log

GlastonburyC avatar Dec 01 '16 11:12 GlastonburyC

Same results on windows x64 whether or not I follow the instructions or just npm install node-opencv.

npm : v3.8.6 node: v4.3.0

Is there not a node-pre-gyp built version of this somewhere?

hlfshell avatar Dec 12 '16 16:12 hlfshell

Same problem here - any news on this?

riccardolardi avatar Dec 22 '16 13:12 riccardolardi

I got it to work eventually, but I'm not exactly sure how. Some things I did do is install node version manager (nvm) and use node version 4.2.2. Maybe that will help you all.

tsboom avatar Dec 22 '16 16:12 tsboom

@tsboom Just tried with 4.2.2 - still a no go :-/

hlfshell avatar Dec 22 '16 16:12 hlfshell

I encountered a similar (but not this exact one) node-pre-gyp issue, and what (seemingly) helped was installing node-pre-gyp globally.

npm install node-pre-gyp -g

mx781 avatar Dec 22 '16 22:12 mx781

Question:

node-pre-gyp ERR! Tried to download: https://node-opencv.s3.amazonaws.com/opencv/v5.0.0/Release/node-v46-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp)

Is there a list of what pre-gyp binaries ARE out there so we can use nvm to get the right combination to avoid having to go through the build process?

hlfshell avatar Dec 22 '16 22:12 hlfshell

Is this actually still maintained? Can anyone from the team comment on this? It seems it's not possible to install with current versions of node & Mac OS X / Win

riccardolardi avatar Dec 23 '16 14:12 riccardolardi

What's the output if you run pkg-config --cflags opencv?

Try link OpenCV to be sure that it's just not the paths missing (they need to be accessible in /usr/local/lib as well): brew link --override opencv

@hlfshell I don't think the aws account is active any longer, so the build needs to be done on pkg install 😞

danschultzer avatar Dec 24 '16 10:12 danschultzer

I'll recommend you guys to use OpenCV3 instead brew install opencv3; brew link --force opencv3

Schultzer avatar Dec 24 '16 10:12 Schultzer

@Schultzer Not all of us is using macs ;-). Are you suggesting that this is built for only oepncv3 and we're possibly using opencv2.#, hence our issues?

@alberto2000 @danschultzer If the aws account is no longer active that does seem to raise questions about maintenance. node-pre-gyp and prebuilt libraries makes native node modules a dream, and its a shame that one of the coolest packages isn't making use of it. If anyone can get some builds together, perhaps we can find someone else willing to host on their AWS account?

@danschultzer The output to pkg-config --cflags openc executed directly within the node-opencv directory (I think that's what you were asking?)

λ pkg-config.exe --cflags opencv
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found

hlfshell avatar Dec 24 '16 13:12 hlfshell

The problem isn't that you're using opencv2 instead of 3, but that the compiler deps can't be found. It usually means that opencv has not been installed, or the libs haven't been linked correctly. It would be great to have the prebuilt package working, though.

@hlfshell sounds like opencv isn't installed?

danschultzer avatar Dec 24 '16 17:12 danschultzer

@danschultzer opencv2 is definitely installed, and I have the env-vars set to the correct dir and build (x64), and visual studio version (vc12). Environment variables for the install location are set and correct to (confirmed set in terminal as well). Should I go ahead and try opencv3?

Looking more into errors thrown during my build, I'm seeing the following:

C:\Users\hlfshell\.node-gyp\4.6.2\include\node\v8.h(18): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory (..\src\HighGUI.cc) [C:\Users\hlfshell\node-opencv\build\opencv.vcxproj

This is thrown multiple times when going through opencv's src folder files. ...so it appears whenever stddef.h is referenced, I get a ton of thrown errors. That's hitting about the limit of my understanding of build this though, so any advice is appreciated.

hlfshell avatar Dec 24 '16 18:12 hlfshell

Doing some playing around, I wondered if it was defaulting to VS2015 or 2013 (both are on the system). I switched it over to 2013 using

npm install --msvs_version2013

and got different results, but still ultimately failure. It got past the stddef.h errors, but threw errors at:

c:\users\hlfshell\opencv\build\include\opencv2\flann\any.h(48): error C2039: 'type_info' : is not a member of 'std' (..
\test\nativemat.cc) [C:\Users\hlfshell\node-opencv\build\test_nativemat.vcxproj]
c:\users\hlfshell\opencv\build\include\opencv2\flann\any.h(60): error C2039: 'type_info' : is not a member of 'std' (..
\test\nativemat.cc) [C:\Users\hlfshell\node-opencv\build\test_nativemat.vcxproj]
...etc...

hlfshell avatar Dec 24 '16 19:12 hlfshell

By installing opencv3 using brew tap homebrew/science brew install opencv3 --with-contrib (https://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/) I've managed to finish the install running npm install --save-dev opencv, still getting errors though regarding node-pre-gyp:

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v48-darwin-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) 
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

And when I try to require('opencv') from within a project I get an error: App threw an error during load Error: Cannot find module '/Users/alberto2000/Sites/armory-test/node_modules/opencv/build/opencv/v6.0.0/Release/electron-v1.4-darwin-x64/opencv.node'

... any help is greatly appreciated

riccardolardi avatar Jan 02 '17 13:01 riccardolardi

Got it working on Windows 10!

Installed the windows build tools first: link.

Then ran npm install on the node-opencv clone I did and boom - it works. Tried some examples in the examples folder with success too. I am yet to use a lot of the stuff but this looks promising.

It does still worry me about the problems on non windows system builds, the lack of pre-node-gyp builds, and response from the maintainer - it'd be nice to know if this library is still supported.

hlfshell avatar Jan 03 '17 15:01 hlfshell

I tried to install windows build tools but I'm still getting error, any hint please?

C:>npm install --global windows-build-tools

[email protected] postinstall C:\Users\saifg\AppData\Roaming\npm\node_modules\windows-build-tools node ./lib/index.js

... and 1 more Downloaded python-2.7.11.msi. Saved to C:\Users\saifg.windows-build-tools\python-2.7.11.msi. Starting installation... Please restart this script from an administrative PowerShell! The build tools cannot be installed without administrative rights. To fix, right-click on PowerShell and run "as Administrator". npm ERR! Windows_NT 10.0.14393 npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "windows-build-tools" npm ERR! node v6.9.2 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node ./lib/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node ./lib/index.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the windows-build-tools package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./lib/index.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs windows-build-tools npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls windows-build-tools npm ERR! There is likely additional logging output above. npm ERR! Windows_NT 10.0.14393 npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "windows-build-tools" npm ERR! node v6.9.2 npm ERR! npm v3.10.9 npm ERR! path C:\npm-debug.log.2986930661 npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall open

npm ERR! Error: EPERM: operation not permitted, open 'C:\npm-debug.log.2986930661' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, open 'C:\npm-debug.log.2986930661' npm ERR! at Error (native) npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'open', npm ERR! path: 'C:\npm-debug.log.2986930661' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! C:\npm-debug.log

cyberphantom avatar Jan 07 '17 16:01 cyberphantom

Right from your log....

"...Please restart this script from an administrative PowerShell! The build tools cannot be installed without administrative rights. To fix, right-click on PowerShell and run "as Administrator"...

Sent from my iPhone

On Jan 7, 2017, at 10:40 AM, Saif Alabachi [email protected] wrote:

... and 1 more Downloaded python-2.7.11.msi. Saved to C:\Users\saifg.windows-build-tools\python-2.7.11.msi. Starting installation... Please restart this script from an administrative PowerShell! The build tools cannot be installed without administrative rights. To fix, right-click on PowerShell and run "as Administrator".

thelarz avatar Jan 07 '17 16:01 thelarz

I am having trouble installing node-opencv on a coworkers computer. I'm having the same issues. Any help on how to install this on Mac Yosemite would be great.

tsboom avatar Jan 20 '17 17:01 tsboom