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

Module could not be found | libnut.node #365

Closed
jonkad opened this issue Jan 27, 2022 · 12 comments
Closed

Module could not be found | libnut.node #365

jonkad opened this issue Jan 27, 2022 · 12 comments

Comments

@jonkad
Copy link

jonkad commented Jan 27, 2022

Hi ✌️ ,

I'm also currently switching from robotJS to nut.js and it seems I've got an equal issue, but with electron-builder...
Maybe this has also happened to someone who have a solution?

Thanks a lot 😄

image

On unpacked asar the message mentioned C:\Program Files\ Control\resources\app\node_modules@nut-tree\libnut-win32\build\Release\libnut.node

"dependencies": {
        "@nut-tree/nut-js": "^2.0.2-next.20220121214305",
        "electron-updater": "^4.6.1",
    },
    "devDependencies": {
        "electron": "^15.3.5",
        "electron-builder": "^22.14.5",
        "electron-notarize": "^1.1.1",
        "electron-rebuild": "^3.2.7",
        "electron-updater": "^4.6.1"
    }
@s1hofmann
Copy link
Member

Hi @jonkad 👋

Is this error happening on your dev machine, or after shipping it to another box?

@jonkad
Copy link
Author

jonkad commented Jan 27, 2022

Hi @s1hofmann,

This happened after shipping. On dev mashine and some others everything is fine.

@s1hofmann
Copy link
Member

Did you make sure to meet the Windows requirements on the target machine?

@jonkad
Copy link
Author

jonkad commented Jan 27, 2022

Ah, is that necessary on the target machines as well?
On the DEV / Build machine it is of course installed.

@s1hofmann
Copy link
Member

is that necessary on the target machines as well?

Yes, these are runtime requirements. I'll highlight this more clearly in the docs 👍

@jonkad
Copy link
Author

jonkad commented Jan 27, 2022

Thank you for your assistance! And forgive me for the carelessness 😉

@jonkad jonkad closed this as completed Jan 27, 2022
@s1hofmann
Copy link
Member

You're welcome. Would be nice to hear how you learned about nut.js, considering your move from robot.js?

@augustnmonteiro
Copy link

@s1hofmann is there a way to ship the runtime requirements together with the installer?

@GaurangTandon
Copy link

Hi @s1hofmann 👋

Often, the users of automation apps (think support desk agents) are not admin users. So, if an app built using libraries like nut.js is shipped to them, they will not have the permission to install VCRedist (Windows requirement) on their system.

This is also noted by the MS official docs (link) and their suggestion in such case is to do "local deployment": copy the relevant .dll files in the same folder as the .node/.exe files.

I tried the same technique with libnut.node, unfortunately, it did not work. I want to confirm from you if you are aware of any specifics in libnut.node that may cause local deployment to not work?

Local deployment is crucial for such types of applications (non-admin users), and also for building portable binaries of apps. So, it would be great if it worked.

@s1hofmann
Copy link
Member

nut-tree/libnut-core#130

@GaurangTandon
Copy link

Thanks @s1hofmann , I just tried this again and it works! (imported libnut snapshot and did libnut.keyTap/typeString, on a PC without VCredist installed)

@GaurangTandon
Copy link

You may wish to update the docs for first steps on Windows once a new nut.js release is out.

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

4 participants