Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Native module not found in win10 has new problem? #687

Closed
acefeel opened this issue May 17, 2019 · 8 comments
Closed

Native module not found in win10 has new problem? #687

acefeel opened this issue May 17, 2019 · 8 comments
Labels

Comments

@acefeel
Copy link

acefeel commented May 17, 2019

I build a js file and put into opencv4nodejs native module in it, after I pkg the js file into .exe file, then I copy opencv4nodejs.node in to the exe folder, it got me an err:
PS D:\cv> ./a
pkg/prelude/bootstrap.js:1185
throw error;
^

Error: The specified module could not be found.
\\?\D:\cv\opencv4nodejs.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:728:18)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:635:17)
at Module.require (pkg/prelude/bootstrap.js:1166:31)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\snapshot\cv\node_modules\opencv4nodejs\lib\cv.js:17:8)
at Module._compile (pkg/prelude/bootstrap.js:1261:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:710:10)

run node a.js is ok, node version 10.15.3 pkg version 4.4.0
it seems \\?\ is the problem? what is that?
pkg in ubuntu 18 node10 is OK.
I found there is a issue in cmake windows about pkg, but how to solve this? thanks.

@paper-lark
Copy link

I have this issue too. Is there any way to fix it?

@patrickhulce
Copy link

I am also intermittently having this problem. Has anyone found workarounds or even discovered a root cause? So far only Windows 7 machines have reported this error in my app, but if others see it in Windows 10 that's concerning.

@patrickhulce
Copy link

it seems \?\ is the problem? what is that?

\\? seems to be a windows hack to deal with filepaths longer than 260 characters. That feels like it could be the difference on Windows 7 with others in that issue reporting Windows 8 and Windows 10 not having this problem, but I'm not sure if this is pkg-specific change or would require a hack of node's require system.

@patrickhulce
Copy link

OK in case this helps others I think this is unrelated to the \\? bit (which seems to work as intended) and this error is misleading because it's actually about missing DLLs that are required by your native node addon which can be analyzed with dependencywalker.

In my case (sharp) the Windows 7 machine was missing the C++ 2015 Redistributable library that comes baked in Windows 10 these days.

Related issues

electron/asar#75
electron/asar#129
electron/packager#424
electron/electron#10291
https://www.drivereasy.com/knowledge/api-ms-win-crt-runtime-l1-1-0-dll-missing-error-solved/

@dtboy1995
Copy link

Win10 The same issue

@JeffJassky
Copy link

Same here.

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

@github-actions github-actions bot added the Stale label Jun 25, 2021
@github-actions
Copy link

github-actions bot commented Jul 1, 2021

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

@github-actions github-actions bot closed this as completed Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants