Open AlexSmirnov9107 opened 1 week ago
I got to the bottom of this by researching #134, so I'd like to comment here as well.
The cause is that a boolean is passed to @std/fmt/0.223.0/colors.js L117
.
function run(str, code) {
console.log(`★str: ${str}`);
return enabled
? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
: str;
}
★str: %s
★str: %s
info config found opencv4nodejs section in C:\Work\Instore\workspace\_survey\cv-crash-case_fix\package.json
info envAutodetect autodetect 0 changes
info init no_autobuild is set.
info init
info applyEnvsFromPackageJson the following opencv4nodejs environment variables are set in the package.json:
★str: autoBuildOpencvVersion
★str: autoBuildOpencvVersion
★str: 4.9.0
★str: 4.9.0
info applyEnvsFromPackageJson autoBuildOpencvVersion: 4.9.0
★str: autoBuildFlags
★str: autoBuildFlags
★str: -DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui
★str: -DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui
info applyEnvsFromPackageJson autoBuildFlags: -DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui
★str: autoBuildWithoutContrib
★str: autoBuildWithoutContrib
★str: true
info init no_autobuild is set.
info init
info applyEnvsFromPackageJson the following opencv4nodejs environment variables are set in the package.json:
★str: autoBuildOpencvVersion
★str: autoBuildOpencvVersion
★str: 4.9.0
★str: 4.9.0
info applyEnvsFromPackageJson autoBuildOpencvVersion: 4.9.0
★str: autoBuildFlags
★str: autoBuildFlags
★str: -DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui
★str: -DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui
info applyEnvsFromPackageJson autoBuildFlags: -DBUILD_LIST=core,imgproc,imgcodecs,videoio,highgui
★str: autoBuildWithoutContrib
★str: autoBuildWithoutContrib
★str: true
C:\Work\Instore\workspace\_survey\cv-crash-case_fix\node_modules\@u4\opencv-build\script\deps\jsr.io\@std\fmt\0.223.0\colors.js:120
? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
^
TypeError: str.replace is not a function
Macos OpenCV installed with brew
Node.js v20.11.1 OpenCV 4.9.0_4
package.json