quasarframework/quasar · error
${tool} could not build
Error message
${tool} could not build What it means
In Electron mode packaging, Quasar invokes an external packager tool (electron-packager or electron-builder, chosen via the bundler/`bundler` and target settings). If the tool's promise rejects, this warning is printed with a FAIL badge, the underlying error is logged to console, and the packaging promise is rejected.
Source
Thrown at app-vite/lib/modes/electron/electron-builder.js:204
const bundlePromise =
bundlerName === 'packager'
? bundler({
...bundlerConfig,
electronVersion: getPackageJson('electron', appPaths.electronDir)
.version
})
: bundler.build(bundlerConfig)
bundlePromise
.then(() => {
log()
done()
log()
resolve()
})
.catch(err => {
log()
warn(`${tool} could not build`, 'FAIL')
log()
console.error(err + '\n')
reject(err)
})
return promise
}
}
View on GitHub (pinned to 4841521b5f)
Solutions
- Read the error logged below the warning (console.error(err)) — it contains the actual packager failure and points at the offending config or resource.
- Fix electron-builder/packager config: check package.json > build (or quasar.config > electron > bundler/unpacker options), icons, and target list.
- Re-run with a network available or a cached Electron dist (ELECTRON_MIRROR / electron-builder cache) if the cause was downloading binaries.
- Try the other bundler (quasar.config electron > bundler: 'packager' vs 'builder') to isolate whether the issue is tool-specific.
Example fix
// quasar.config.js — before
electron: { bundler: 'builder' } // failing due to bad build config
// after: fix package.json build section or switch bundler
electron: { bundler: 'packager' } Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight checks before electron packaging
const fs = require('fs');
const pkg = require(process.cwd() + '/package.json');
if (!fs.existsSync('src-electron')) throw new Error('src-electron missing');
if (fs.existsSync('src-electron/icons') && !fs.readdirSync('src-electron/icons').length) throw new Error('electron icons folder is empty'); Try / catch
try {
await quasarBuild({ mode: 'electron' });
} catch (err) {
// err matches the console.error output from electron-builder.js:204
console.error('Electron packager failed:', err.message);
// fall back to the other bundler or re-run with verbose logging
process.exitCode = 1;
} Prevention
- Keep the electron-builder `build` section in package.json valid; validate icons (correct format/sizes) and target definitions.
- Ensure CI has network access or a warm electron-builder cache for downloading Electron binaries.
- Run `quasar build -m electron` locally after every change to electron config or icons.
- Isolate tool-specific failures by temporarily switching bundler between 'packager' and 'builder'.
When it happens
Trigger: #packageFiles in electron-builder.js when the packager's returned promise rejects — e.g. electron-builder failing on missing build resources/icons, invalid `electron.bundlerBuilder` config in package.json, no matching targets, or network failure downloading Electron binaries.
Common situations: Missing/oversized icon files (electron-builder requires specific sizes/format); misconfigured `build` section in package.json; offline CI unable to download the Electron dist zip; signing/notarization failures on macOS; insufficient disk space.
Related errors
- Skipping unsupported entry type at ${fullPath}
- No output folder found for target "${target}". Files have no
- Electron support detected already. Aborting.
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/9ade6b073ea756db.
Report an issue: GitHub.