Images not displayed
What version of pkg are you using?
5.8.0
What version of Node.js are you using?
14.18.1
What operating system are you using?
Windows
What CPU architecture are you using?
Intel i5
What Node versions, OSs and CPU architectures are you building for?
node14-win-x64
Describe the Bug
Hello everyone ! I'm using node-notifier to create windows alert, it works great when running my application in VScode but when I package it with pkg the icon isn't displayed in the notification (the rest is working).
Here my package.json
{
"name": "testapp",
"version": "1.0.0",
"scripts": {
"build": "pkg package.json"
},
"bin": "index.js",
"pkg": {
"assets": [
"public/**/*",
"node_modules/**/*"
],
"targets": [
"node14-win-arm64"
],
"outputPath": "dist"
},
"dependencies": {
"express": "^4.18.1",
"node-notifier": "^10.0.1",
"pkg": "^5.8.0"
}
}
And here is the function where I use node-notifier :
notify = (title, message, iconName, sound = true) => {
const icon = path.join(__dirname, "..\\..\\public\\images\\" + iconName);
const notifier = new windowsToaster();
notifier.notify({
appID: "Alertes Amplivia",
title,
message,
sound,
icon,
});
};
Expected Behavior
I expect to have a windows notification with some text and an icon but when running the executable only the text is displayed in the notification. I check the structure in the executable using the --debug option and the "public" folder is in the executable and the path I try to get in the application is correct.
To Reproduce
To reproduce I just create a basic express api with the package.json and the function I showed above. Here the structure of the app :
|-- node_modules
|-- public
|-- images
|-- icon.png
|-- index.js
|-- package.json
Same here, plz someone help.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.