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

Error: The specified module could not be found (External DLLs) #2038

Closed
4piu opened this issue Dec 22, 2023 · 0 comments
Closed

Error: The specified module could not be found (External DLLs) #2038

4piu opened this issue Dec 22, 2023 · 0 comments

Comments

@4piu
Copy link

4piu commented Dec 22, 2023

What version of pkg are you using?

5.8.1

What version of Node.js are you using?

18.19.0

What operating system are you using?

Windows

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

win-x64

Describe the Bug

I am having trouble build and run a project that uses vigemclient.

pkg/prelude/bootstrap.js:1872
      throw error;
      ^

Error: The specified module could not be found.
C:\Users\xyz\AppData\Local\Temp\pkg\dffb76492e2b5438facb6abd07322a39427b6471a6eef1eb498d361e2d664f5a\vigemclient\build\Release\vigemclient.node
    at process.dlopen (pkg/prelude/bootstrap.js:2251:28)
    at Module._extensions..node (node:internal/modules/cjs/loader:1196:18)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at Module.require (pkg/prelude/bootstrap.js:1851:31)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\snapshot\MyProj\node_modules\vigemclient\lib\ViGEmClient.js:1:83)
    at Module._compile (pkg/prelude/bootstrap.js:1926:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.5.0

In the <temp_path>\vigemclient\build\Release folder, there's only a single vigemclient.node file, where its dependency files (.dll, etc.) are missing. If I copy the required file manually from node_modules to the temp folder, the program runs without issue.

Expected Behavior

Would like to know how I can configure the pkg so it leave some node_modules untouched. Or is it possible it can sort out these external dependencies.

To Reproduce

const ViGEmClient = require('vigemclient');
@leerob leerob closed this as completed Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants