Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using node-windows in electron app #232

Closed
ghost opened this issue Feb 28, 2019 · 1 comment
Closed

Using node-windows in electron app #232

ghost opened this issue Feb 28, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 28, 2019

Hi,

I have an issue using node-windows in my electron app. I already check this post but it did not help me
https://github.com/coreybutler/node-windows/issues/173

My project is almost the same : The Electron app will just allow me to "manage" the service via a Tray Menu and especially to install it with a multi-platform setup (.exe, .msi, linux, ...).

My problem : the whole app works in dev (Tray menu, install service, start/stop service and others features via the menu). Electron can build it (.exe). It installs the app but when it starts an error message is displayed : "Cannot find module 'node-windows'" (see screenshot for more details)

I have two package.json and both contain "node-windows": "^0.1.14" in dependencies
-root/
--app/
---package.json
--package.json ("main": "app/electron.js")

Can you help me please ? You can find my electron.js file and how it use the service in service.js (attached as .txt files)

node-windows
)
electron.txt
service.txt

@coreybutler
Copy link
Owner

Closing due to age.

For anyone coming across this via a Google search:

This most likely has to do with the build process not properly including node-windows. Issue #245 dives into some detail about working with Electron and node-windows

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant