Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when installing #147

Open
stoefln opened this issue Jun 28, 2024 · 5 comments
Open

Error when installing #147

stoefln opened this issue Jun 28, 2024 · 5 comments

Comments

@stoefln
Copy link

stoefln commented Jun 28, 2024

I just tried to install the module for my electron v16 project.

I get this:

npm ERR! code 1
npm ERR! path /Users/steph/Workspace/repeato-studio/node_modules/@u4/opencv4nodejs
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR!
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.4 found at "/opt/homebrew/opt/[email protected]/bin/python3.11"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/steph/Workspace/repeato-studio/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/steph/Workspace/repeato-studio/node_modules/@u4/opencv4nodejs/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/steph/Workspace/repeato-studio/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/steph/Library/Caches/node-gyp/16.13.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/steph/Library/Caches/node-gyp/16.13.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/steph/Workspace/repeato-studio/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/steph/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/steph/Workspace/repeato-studio/node_modules/@u4/opencv4nodejs',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: Call to 'node ./bin/install.js OPENCV4NODEJS_DEFINES' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/Users/steph/Workspace/repeato-studio/node_modules/node-gyp/lib/configure.js:297:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 23.1.0
npm ERR! gyp ERR! command "/Users/steph/.nvm/versions/node/v16.13.0/bin/node" "/Users/steph/Workspace/repeato-studio/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/steph/Workspace/repeato-studio/node_modules/@u4/opencv4nodejs
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v10.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/steph/.npm/_logs/2024-06-28T10_30_25_414Z-debug.log

Any ideas?

@liftyourgame
Copy link

Try node 20?

@OkFrog97
Copy link

I have same problem. WSL Ubuntu 22.04.
"
1055 error gyp: Call to 'node ./bin/install.js OPENCV4NODEJS_DEFINES' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
1055 error gyp ERR! configure error
...
1055 error gyp ERR! node -v v20.15.1
1055 error gyp ERR! node-gyp -v v10.2.0
1055 error gyp ERR! not ok
"

@HassanAlti
Copy link

Same error here, WSL Ubuntu 22.04, and node -v 20.17.0

@HassanAlti
Copy link

Same error here, WSL Ubuntu 22.04, and node -v 20.17.0

Fixed by doing OPENCV4NODEJS_DISABLE_AUTOBUILD=1 pnpm install @u4/opencv4nodejs

Took about 15 mins to install

@GreatHongyu
Copy link

OPENCV4NODEJS_DISABLE_AUTOBUILD=1 pnpm install @u4/opencv4nodejs
not work for me, windows10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants