Solution 1: Use extraResources
instead of extraFiles
In your forge.config.js
, try using extraResources instead of extraFiles:
module.exports = {
packagerConfig: {
asar: true,
},
makers: [
// your makers config
],
plugins: [
[
'@electron-forge/plugin-auto-unpack-natives',
{
// options if needed
},
],
],
packagerConfig: {
extraResources: [
{
from: 'resources/myprogram.exe',
to: 'resources/myprogram.exe',
},
],
},
};
Solution 2: Update your package.json
configuration
Try this in your package.json
:
"build": {
"appId": "myapp",
"extraResources": [
{
"from": "resources/myprogram.exe",
"to": "resources"
}
]
}
Solution 3: Check file paths and structure
Ensure that:
If none of these work, please provide:
forge.config.js
package.json
build configuration