-
Notifications
You must be signed in to change notification settings - Fork 51
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: Cannot find module 'XXX/node_modules/.pnpm/@[email protected]/node_modules/@u4/opencv4nodejs/build/Release/opencv4nodejs' #122
Comments
I have same issue after packaged application and install it on another PC |
@junehunter Need to build @sollosollo4 do you copy/bundle |
@AbaoFromCUG what do u mean? I gues yes, but how I can check this. Im not copy, but this going up in app.asar.unpacked when building |
if I have tme, I'll check what happends if I require library by next code
|
The Windows environment builds successfully, but Linux does not build the opencv4nodejs binary correctly. |
This is the logic that should be implemented (but currently it is not)Normally, Bundle (like webpack/vite) will copy The package maintainer should write code like
When we use the package in package.json and webpack+node-loader, the output Of our project should be
and the code in
Just like What we can do?modify the relevant source code, but it is hard…… You need hack the
The simple step to copy dll/node to the side of |
/XXX/node_modules/.pnpm/@u4[email protected]/node_modules/@u4/opencv4nodejs/lib/cvloader.js:62
throw err;
^
Error: Cannot find module '/XXX/node_modules/.pnpm/@u4[email protected]/node_modules/@u4/opencv4nodejs/build/Release/opencv4nodejs'
Require stack:
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
at Function.Module._resolveFilename (/home/develop/nodejs/tensorflow-node/node_modules/.pnpm/[email protected]/node_modules/module-alias/index.js:49:29)
at Function.Module._load (node:internal/modules/cjs/loader:871:27)
at Module.require (node:internal/modules/cjs/loader:1098:19)
at require (node:internal/modules/cjs/helpers:108:18)
at getOpenCV (/home/develop/nodejs/tensorflow-node/node_modules/.pnpm/@u4[email protected]/node_modules/@u4/opencv4nodejs/lib/cvloader.js:54:23)
at loadOpenCV (/home/develop/nodejs/tensorflow-node/node_modules/.pnpm/@u4[email protected]/node_modules/@u4/opencv4nodejs/lib/opencv4nodejs.js:6:48)
at Object. (/home/develop/nodejs/tensorflow-node/node_modules/.pnpm/@u4[email protected]/node_modules/@u4/opencv4nodejs/lib/opencv4nodejs.js:21:12)
at Module._compile (node:internal/modules/cjs/loader:1196:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10) {
code: 'MODULE_NOT_FOUND',
The text was updated successfully, but these errors were encountered: