opencv4nodejs icon indicating copy to clipboard operation
opencv4nodejs copied to clipboard

initialization H3Error: Cannot find module './promisify.js'

Open parsingk opened this issue 1 year ago • 2 comments

ERROR MESSAGE

[nuxt] error caught during app initialization H3Error: Cannot find module './promisify.js'
Require stack:

  • D:\data\threejs\threejs-tutorials@u4\opencv4nodejs at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) at Module._load (node:internal/modules/cjs/loader:920:27) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at D:\data\threejs\threejs-tutorials@u4\opencv4nodejs:2:24 at ViteNodeRunner.directRequest (file:///D:/data/threejs/threejs-tutorials/node_modules/vite-node/dist/client.mjs:308:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ViteNodeRunner.cachedRequest (file:///D:/data/threejs/threejs-tutorials/node_modules/vite-node/dist/client.mjs:152:14) at async ViteNodeRunner.dependencyRequest (file:///D:/data/threejs/threejs-tutorials/node_modules/vite-node/dist/client.mjs:200:14) at async D:\data\threejs\threejs-tutorials\lib\OpenCVTest.ts:1:31 { statusCode: 500, fatal: false, unhandled: false, statusMessage: undefined, __nuxt_error: true }

Environment

  • windows 10

  • opencv 4.7.0

  • nuxt.js

  • @u4/opencv4nodejs 6.5.0

  • In package.json
    "opencv4nodejs": { "disableAutoBuild": 1, "autoBuildOpencvVersion": "4.7.0", "opencvIncludeDir": "D:\opencv\build\include", "opencvLibDir": "D:\opencv\build\x64\vc16\lib", "opencvBinDir": "D:\opencv\build\x64\vc16\bin" }

  • build-opencv configure info config found opencv4nodejs section in D:\data\threejs\threejs-tutorials\package.json info envAutodetect autodetect 0 changes info envAutodetect - failed to resolve OPENCV_BIN_DIR from c:\tools\opencv\build\x64\vc14\bin info envAutodetect - failed to resolve OPENCV_INCLUDE_DIR from c:\tools\opencv\build\include info applyEnvsFromPackageJson the following opencv4nodejs environment variables are set in the package.json: info applyEnvsFromPackageJson disableAutoBuild: 1 info applyEnvsFromPackageJson autoBuildOpencvVersion: 4.7.0 info applyEnvsFromPackageJson opencvIncludeDir: D:\opencv\build\include info applyEnvsFromPackageJson opencvLibDir: D:\opencv\build\x64\vc16\lib info applyEnvsFromPackageJson opencvBinDir: D:\opencv\build\x64\vc16\bin info install Using openCV 0.0.0 info install Using lib dir: D:/opencv/build/x64/vc16/lib info install OPENCV4NODEJS_DISABLE_AUTOBUILD is set skipping auto build... info install writing auto-build file into directory: D:\opencv\opencv-0.0.0-8b1ea\auto-build.json info install Failed to create link D:\opencv\latest to D:\opencv\opencv-0.0.0-8b1ea Error: EPERM: operation not permitted, symlink 'D:\opencv\opencv-0.0.0-8b1ea' -> 'D:\opencv\latest' info install info install Found the following libs: info install world: D:\opencv\build\x64\vc16\lib\opencv_world470.lib info defines info defines Setting the following defines: info defines OPENCV4NODEJS_FOUND_LIBRARY_WORLD info install info install Setting the following includes: info includes D:/opencv/build/include info libs info libs Setting lib from D:/opencv/build/x64/vc16/lib : opencv_world470.lib . . . info install node-gyp complete successfully

Question

but it shows Cannot find module './promisify.js' when i run.

could you help me please?




parsingk avatar Mar 10 '23 09:03 parsingk

1- use opencv 4.6.0 for now. 2- where is the code ?

UrielCh avatar Mar 10 '23 15:03 UrielCh

info config found opencv4nodejs section in D:\data\threejs\threejs-tutorials\package.json
info envAutodetect autodetect 0 changes
info envAutodetect - failed to resolve OPENCV_BIN_DIR from c:\tools\opencv\build\x64\vc14\bin
info envAutodetect - failed to resolve OPENCV_INCLUDE_DIR from c:\tools\opencv\build\include

please use chocolatey build, that should works out of the box.

UrielCh avatar Mar 10 '23 15:03 UrielCh