Skip to content

Issues with node-gyp #880

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

Open
Fy50167 opened this issue May 31, 2024 · 4 comments
Open

Issues with node-gyp #880

Fy50167 opened this issue May 31, 2024 · 4 comments

Comments

@Fy50167
Copy link

Fy50167 commented May 31, 2024

The following errors occurs when running both npm i @u4/opencv4nodejs and npm i opencv4nodejs

npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\Users\Fy501\Desktop\perimeter_code\node_modules\@u4\opencv4nodejs',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Fy501\Desktop\perimeter_code\node_modules@u4\opencv4nodejs\node_modules\eslint'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\Fy501\Desktop\perimeter_code\node_modules\@u4\opencv4nodejs\node_modules\eslint'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\Fy501\Desktop\perimeter_code\node_modules@u4\opencv4nodejs
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
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] | win32 | x64
npm ERR! gyp info find Python using Python version 3.12.0 found at "C:\Users\Fy501\AppData\Local\Programs\Python\Python312\python.exe"
npm ERR! gyp info find VS using VS2022 (17.10.34928.147) found at:
npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Fy501\AppData\Local\Programs\Python\Python312\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\Fy501\Desktop\perimeter_code\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 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Fy501\Desktop\perimeter_code\node_modules\@u4\opencv4nodejs\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Fy501\Desktop\perimeter_code\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Fy501\AppData\Local\node-gyp\Cache\21.5.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=C:\Users\Fy501\AppData\Local\node-gyp\Cache\21.5.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\Fy501\Desktop\perimeter_code\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\Fy501\\AppData\\Local\\node-gyp\\Cache\\21.5.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\Fy501\Desktop\perimeter_code\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 'C:\Users\Fy501\Desktop\perimeter_code\node_modules\@u4\opencv4nodejs\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. (C:\Users\Fy501\Desktop\perimeter_code\node_modules\node-gyp\lib\configure.js:297:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Fy501\Desktop\perimeter_code\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\Fy501\Desktop\perimeter_code\node_modules@u4\opencv4nodejs
npm ERR! gyp ERR! node -v v21.5.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: C:\Users\Fy501\AppData\Local\npm-cache_logs\2024-05-31T22_55_31_440Z-debug-0.log

@stoefln
Copy link

stoefln commented Oct 14, 2024

Same here. node v18

@skizzo
Copy link

skizzo commented Nov 11, 2024

Hi, did you solve this somehow?

@emptydn1
Copy link

help same error

@brcarp
Copy link

brcarp commented Feb 6, 2025

Doing an npm install of @u4/opencv-build first addressed the OPENCV4NODEJS_DEFINES issue for me. It's a dependency but it's not guaranteed to be present when the install script (which requires it) is run.

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