-
Notifications
You must be signed in to change notification settings - Fork 322
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 package with pkg module #220
Comments
Not sure for Windows as I haven't got around to it yet but you usually have to copy that .exe file to the folder where your pkg executable is built. i.e. copy For any Mac user who got here, it was slightly different and PKG wasn't totally clear.
You copy the
So in the end you should have the following structure at your build folder.
Doing the above worked for me and executed the notification from the built pkg file. |
Thanks! Added this issue to the readme |
This MacOS workaround doesn't seem to work (anymore). I copy the terminal-notifier executable, Info.plist and MainMenu.nib to path-to-executable/notifier/* but my own executable created by pkg doesn't seem to be able to find them. There is no notification issued and no error message appearing when running my pkg-created executable, when running the application using "node index.js" notifications are appearing. OS: MacOS 10.14.6 |
windows 10 also doesn't seem to work |
@normen I found a workaround: You need to copy the necessary files into the path-to-executable dir, in my base
Then you need to create your own notifier, using customPath:
|
For Windows 10 users (@PabloWestphalen, @EasonWang01), pkg is actually misconfigured. I've just sent a PR to fix this: vercel/pkg#1021. |
@GerkinDev i still have the errors
Do someone know how to get it working for windows at least? |
Hi, i have resolved it finally.
The problem is related to the ES6 module and i tried to complie my entry by
and then use
it works fine now
|
this answers also works for me |
Thanks. It works but with small caveats in my case:
cp node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist bin/notifier/
cp node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier bin/notifier/
{
customPath: path.join(
process.execPath,
'../',
'notifier/terminal-notifier',
),
} I spent some time trying to figure out why it doesn't work for me so I hope I'll save you guys a few hours of debugging. |
It will result then following
OS:windows 10
The text was updated successfully, but these errors were encountered: