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

Doesn't work on nexe #377

Closed
lee1409 opened this issue Jun 30, 2021 · 6 comments · Fixed by #382 or #392
Closed

Doesn't work on nexe #377

lee1409 opened this issue Jun 30, 2021 · 6 comments · Fixed by #382 or #392

Comments

@lee1409
Copy link

lee1409 commented Jun 30, 2021

I was trying to compile my node project into .exe using Nexe. I'm clueless because node-notifier does work on node but not .exe. The .exe file doesn't display any error or something that can give me some hints about what kind of problem I encountered.

Version
"node-notifier": "^10.0.0",
"nexe": "3.3.7"

@yoavain
Copy link
Contributor

yoavain commented Nov 11, 2021

Doesn't work for me either

Version
"node-notifier": "10.0.0",
"nexe": "4.0.0-beta.19"

@yoavain
Copy link
Contributor

yoavain commented Nov 11, 2021

I think I found something. It seems to be related to the customPath option. (This also fits the release notes that mention a fix there)

My notifierOptions:

{
	"withFallback": false,
	"customPath": "X:\\xxxxxxxxxx\\dist\\snoretoast-x64.exe"
}

Debug log

node-notifier debug info (fileCommand):
[notifier path] X:\xxxxxxxxxx\dist\vendor\snoreToast\snoretoast-x64.exe

Seems that somewhere along the way the vendor\snoreToast is added.
Not sure if that's only when using an absolute path to the binary, or if it will happen to relative as well.

@yoavain
Copy link
Contributor

yoavain commented Nov 11, 2021

Although the documentation note Relative/Absolute path to binary, even when removing the sonretoast-x64.exe from the customPath, the result is the same.
So it seems the actual behavior of customPath is that it expects a folder with vendor\snoreToast\sonretoast-x64.exe rather then a path to binary itself.

@yoavain
Copy link
Contributor

yoavain commented Nov 12, 2021

Found the problem. Opened a PR

@yoavain
Copy link
Contributor

yoavain commented Nov 12, 2021

@lee1409
If your problem you're having is the same as mine, a temporary workaround can be sending customPath in the message options rather then in the WindowsToaster constructor

@lee1409
Copy link
Author

lee1409 commented Nov 12, 2021

Alright thanks @yoavain ! Will try it when I'm available

mikaelbr added a commit that referenced this issue Feb 1, 2022
Fix issue #377: Fix customPath option in WindowsToaster constructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants