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

Can't find module #16

Closed
Venryx opened this issue Apr 26, 2017 · 7 comments
Closed

Can't find module #16

Venryx opened this issue Apr 26, 2017 · 7 comments

Comments

@Venryx
Copy link

Venryx commented Apr 26, 2017

I'm getting this error when attempting to use the library in a Node program:

C:\Root\Apps\Control\@V\RobotJS\Scripts>node Dist/Main.js
Loading native binary: C:\Root\Apps\Control\@V\RobotJS\Scripts\node_modules\iohook\builds\node-v48-win32-x64\build\Release\iohook.node
module.js:597
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Root\Apps\Control\@V\RobotJS\Scripts\node_modules\iohook\builds\node-v48-win32-x64\build\Release\iohook.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Root\Apps\Control\@V\RobotJS\Scripts\node_modules\iohook\index.js:16:21)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

The file, however, does exist: I copied the path above exactly, into Windows explorer, and it opened the file.

I did a search, and found a similar error message here: http://stackoverflow.com/questions/41253450/error-the-specified-module-could-not-be-found

They suggested to use the Dependeny Walker program to see if it was trying to use a dll that was missing. (as that can be the cause of the error)

I did so, and saw this:

So, it seems that the "libuiohook.dll" file is missing.

But why? I'm not sure how to fix it, as running "npm run build" myself errors, and I can't find a prebuilt copy of the "libuiohook.dll" file.

@soyFerrero
Copy link

The same problem.. @Venryx Some advance?

@Venryx
Copy link
Author

Venryx commented May 25, 2017

@soyFerrero I didn't figure out how to fix it, so I'm just using a different module for global hooks for now: https://github.com/tomzx/gkm

There are some others listed here, if that one doesn't work for you: https://github.com/octalmage/robotjs/wiki/Plugins-(or-compatible-modules)

@soyFerrero
Copy link

@Venryx Thank u so much. I'm going to try it

@Toinane
Copy link

Toinane commented Aug 13, 2017

The same for me on Windows 10 :/ I have the same issue..

@WilixLead
Copy link
Member

You need recompile iohook for windows. At this moment I can't configure appveyor for normal automated compiling for windows :(
But I try to do in in virtual machine with windows today

@thomsa
Copy link

thomsa commented Jan 25, 2019

Hey, I have the same problem with this config file

"iohook": {
    "targets": [
      "node-59",
      "electron-54",
      "electron-57",
      "electron-64"
    ],
    "platforms": [
      "win32",
      "darwin",
      "linux"
    ],
    "arches": [
      "x64",
      "ia32"
    ]
  }

The actual one it's trying to import is the 64
\builds\electron-v64-win32-x64\build\Release\iohook.node
It doesn't work, "specified module could not be found"

Any ideas?

@Djiit
Copy link
Collaborator

Djiit commented Jan 28, 2019

Hi @thomsa , could you please open a new ticket using our template ? Thanks !

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

6 participants