Skip to content
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

Installed and Built but having issues resolving build files #11

Closed
robbybobface opened this issue Jan 20, 2023 · 1 comment
Closed

Installed and Built but having issues resolving build files #11

robbybobface opened this issue Jan 20, 2023 · 1 comment

Comments

@robbybobface
Copy link

Files are installed and built correctly yet it is not able to resolve the built files. I'm assuming its the vigemclient.node file it's looking for, and I can see it in ../build/Release/. Any solutions on how to resolve this issue?

`[ERROR] Could not resolve "../build/Release/vigemclient"

node_modules/vigemclient/lib/ViGEmClient.js:1:28:
  1 │ const vigemclient = require('../build/Release/vigemclient');
    ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/vigemclient/lib/X360Controller.js:1:28:
  1 │ const vigemclient = require('../build/Release/vigemclient');
    ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/vigemclient/lib/DS4Controller.js:1:28:
  1 │ const vigemclient = require('../build/Release/vigemclient');
    ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/vigemclient/lib/ViGEmTarget.js:3:28:
  3 │ const vigemclient = require('../build/Release/vigemclient');
    ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
@jangxx
Copy link
Owner

jangxx commented Jan 21, 2023

Are you trying to use it in electron and bundling it with something like angular? This is not going to work, since it is a native module. You can check out this stackoverflow question for more info.

The way you should probably solve this is by using the native libraries in the main electron file and then using messages to communicate between it and your "frontend".

Or you can try to do what the comments of that stackoverflow thread said and put the module into the externals so it doesn't get bundled. I'm not sure that is going to work though, since I haven't really used electron in many years and have no concrete idea of how it currently works.

@jangxx jangxx closed this as completed Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants