Closed
Description
- Electron-Builder Version: 22.11.11 (4.4.3)
- Node Version: 14.17.1
- Electron Version: 14.0.0
- Electron Type (current, beta, nightly): current
- Target: Windows
I'm attempting to run electron-builder using a JS file for config (so I have access to process.ENV, which isn't available in yaml files). Attempting to run any electron-builder command on Windows results in a JScript error (which is super weird unless somehow electron-builder is trying to execute the file without node). The screenshot was taken after running npx electron-builder
from PowerShell at the project root:
For reference, here's my electron-builder.js:
const config = {
appId: "im.hmt.report.schild",
productName: "schild.report",
artifactName: "schild.report.${ext}",
buildVersion: `2.5.${process.env.GITHUB_RUN_NUMBER}`,
copyright: `Copyright ${process.env.THE_AUTHOR}`,
extraMetadata: {
author: {
name: `${process.env.THE_AUTHOR}`,
email: `${process.env.THE_EMAIL}`
}
},
files: [
"./build/**/*"
],
win: {
icon: "icons/icon.ico",
target: "msi"
},
linux: {
icon: "icons/icon.png",
category: "app.tools",
executableName: "schild.report",
target: [
"AppImage",
"snap",
"deb",
"rpm"
]
},
mac: {
icon: "icons/icon.icns",
target: "dmg"
},
dmg: {
icon: "icons/icon.icns",
contents: [
{
x: 130,
y: 220
},
{
x: 550,
y: 22,
type: "link",
path: "/Applications"
}
],
window: {
width: 680,
height: 42
}
}
}
module.exports = config
This also happens on GitHub Actions hosted runners, so it's not my machine.