Open jay-gaojing opened 6 months ago
@u4/Opencv-build@1.0.0 is not compatible with V6.
please upgrade to @u4/opencv4nodejs@V7
same here
package.json
"dependencies": {
"@u4/opencv-build": "^1.0.0",
"@u4/opencv4nodejs": "^7.0.0",
},
"opencv4nodejs": {
"disableAutoBuild": 1,
"opencvIncludeDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/include/opencv4/",
"opencvLibDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/lib/",
"opencvBinDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/bin/"
}
you can remove: "opencvIncludeDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/include/opencv4/", "opencvLibDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/lib/", "opencvBinDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/bin/"
homebrew's openCV is autodetect, on MacOS, that one of the main differences with the original project.
you can remove: "opencvIncludeDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/include/opencv4/", "opencvLibDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/lib/", "opencvBinDir": "/opt/homebrew/Cellar/opencv/4.9.0_6/bin/"
homebrew's openCV is autodetect, on MacOS, that one of the main differences with the original project.
did not help
info config found opencv4nodejs section in /Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/package.json
info init no_autobuild is set.
info init
info applyEnvsFromPackageJson the following opencv4nodejs environment variables are set in the package.json:
/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/deps/jsr.io/@std/fmt/0.223.0/colors.js:119
? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
^
TypeError: str.replace is not a function
at run (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/deps/jsr.io/@std/fmt/0.223.0/colors.js:119:30)
at Object.green (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/deps/jsr.io/@std/fmt/0.223.0/colors.js:210:12)
at formatNumber (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/src/utils.js:67:43)
at /Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/src/OpenCVBuildEnv.js:396:161
at Array.forEach (<anonymous>)
at new OpenCVBuildEnv (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/src/OpenCVBuildEnv.js:396:21)
at new OpenCVBuilder (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv-build/script/src/OpenCVBuilder.js:75:24)
at getOpenCV (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv4nodejs/cjs/lib/cvloader.js:40:21)
at loadOpenCV (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv4nodejs/cjs/lib/opencv4nodejs.js:36:48)
at Object.<anonymous> (/Users/alexandrsmirnov/Work/lombard-white/nestjs-lombard-terminal/node_modules/@u4/opencv4nodejs/cjs/lib/opencv4nodejs.js:58:14)
i've figured out. instead of
"opencv4nodejs": {
"disableAutoBuild": 1
}
i made
"opencv4nodejs": {
"disableAutoBuild": "1"
}
replace number to string
我已经弄清楚了。 代替
"opencv4nodejs": { "disableAutoBuild": 1 }
我做了
"opencv4nodejs": { "disableAutoBuild": "1" }
将数字替换为字符串
I tried to do that, but reported other errors
fixed in within @u4/opencv-build@1.0.1 thx for the report