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

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

Closed

Description

@acefeel

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.

Activity

  1. paper-lark commented on Nov 23, 2019

    @paper-lark

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

  2. patrickhulce commented on Feb 13, 2020

    @patrickhulce

    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.

  3. patrickhulce commented on Feb 13, 2020

    @patrickhulce

    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.

  4. patrickhulce commented on Feb 13, 2020

    @patrickhulce

    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/

  5. dtboy1995 commented on Jun 2, 2020

    @dtboy1995

    Win10 The same issue

  6. JeffJassky commented on Mar 26, 2021

    @JeffJassky

    Same here.

  7. github-actions commented on Jun 25, 2021

    @github-actions

    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

  8. github-actions commented on Jul 1, 2021

    @github-actions

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions