{"record":{"id":"ca46e96ddfd0b04e","repo":"quasarframework/quasar","slug":"capacitor-support-detected-already-aborting","errorCode":null,"errorMessage":"Capacitor support detected already. Aborting.","messagePattern":"Capacitor support detected already\\. Aborting\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"app-vite/lib/modes/capacitor/capacitor-installation.js","lineNumber":53,"sourceCode":"export async function addMode({ ctx, silent, target, appId, appName }) {\n  const {\n    appPaths,\n    cacheProxy,\n    pkg: { appPkg }\n  } = ctx\n\n  if (isModeInstalled(appPaths, 'capacitor')) {\n    if (target) {\n      ensureWWW(ctx)\n\n      const forceInstall = await ensureModePackageJsonAndWorkspace(\n        'capacitor',\n        ctx\n      )\n      await ensureModeDeps('capacitor', ctx, forceInstall)\n      await addPlatform(target, ctx)\n    } else if (silent !== true) {\n      warn('Capacitor support detected already. Aborting.')\n    }\n\n    return\n  }\n\n  const promptSession = await createPromptSession(\n    'Installing Capacitor Mode...'\n  )\n\n  const defaultAppName = appPkg.productName || appPkg.name || 'Quasar App'\n\n  const answer = {\n    appId: await resolvePromptAnswer({\n      promptSession,\n      value: appId,\n      validate: val => {\n        if (!val) return 'The app id cannot be empty'\n      },","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/modes/capacitor/capacitor-installation.js#L35-L71","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const fs = require('fs');\nif (fs.existsSync('src-capacitor')) {\n  console.log('Capacitor mode already installed — skip `quasar mode add capacitor`');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["capacitor","mode","already-installed"],"backgroundTag":"mode-already-installed","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}