quasarframework/quasar · info
Capacitor support detected already. Aborting.
Error message
Capacitor support detected already. Aborting.
What it means
When adding Capacitor mode (`quasar mode add capacitor`), Quasar first checks whether Capacitor support is already installed in the project. If it is, the add command is a no-op and this warning is printed instead of re-installing.
Source
Thrown at app-vite/lib/modes/capacitor/capacitor-installation.js:53
export async function addMode({ ctx, silent, target, appId, appName }) {
const {
appPaths,
cacheProxy,
pkg: { appPkg }
} = ctx
if (isModeInstalled(appPaths, 'capacitor')) {
if (target) {
ensureWWW(ctx)
const forceInstall = await ensureModePackageJsonAndWorkspace(
'capacitor',
ctx
)
await ensureModeDeps('capacitor', ctx, forceInstall)
await addPlatform(target, ctx)
} else if (silent !== true) {
warn('Capacitor support detected already. Aborting.')
}
return
}
const promptSession = await createPromptSession(
'Installing Capacitor Mode...'
)
const defaultAppName = appPkg.productName || appPkg.name || 'Quasar App'
const answer = {
appId: await resolvePromptAnswer({
promptSession,
value: appId,
validate: val => {
if (!val) return 'The app id cannot be empty'
},View on GitHub (pinned to 4841521b5f)
Solutions
- Do nothing — Capacitor mode is already installed; just build: quasar dev -m capacitor or quasar build -m capacitor.
- If you truly want a fresh setup, remove the src-capacitor directory (and capacitor devDependencies) then run quasar mode add capacitor again.
- Suppress the warning in scripted/CI contexts by passing silent (only relevant if calling the API programmatically).
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
if (fs.existsSync('src-capacitor')) {
console.log('Capacitor mode already installed — skip `quasar mode add capacitor`');
} Prevention
- Make scaffolding scripts idempotent: check for src-capacitor before running `quasar mode add capacitor`.
- Don't delete src-cordova/src-capacitor partially; remove the whole folder if re-adding.
- In CI, treat this warning as success rather than failure.
When it happens
Trigger: Running `quasar mode add capacitor` (addMode in capacitor-installation.js) when a src-capacitor directory / capacitor mode already exists in the project, unless silent===true.
Common situations: Re-running scaffolding scripts or CI provisioning twice; forgetting the mode was already added; a leftover src-capacitor folder from a previous attempt that was never removed.
Related errors
- Cordova support detected already. Aborting.
- Wrong number of parameters (${argv._.length}).
- Unknown action specified (${action}).
- Gradle build failed!
- As an alternative, you can use the "--ide" param and build f
AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30).
Data as JSON: /api/errors/ca46e96ddfd0b04e.
Report an issue: GitHub.