{"record":{"id":"5882d674cc3d5ffe","repo":"quasarframework/quasar","slug":"failed-to-install-capacitor-assets-please-do-it","errorCode":null,"errorMessage":"Failed to install @capacitor/assets. Please do it manually.","messagePattern":"Failed to install @capacitor/assets\\. Please do it manually\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"icongenie/lib/mount/mount-capacitor.js","lineNumber":35,"sourceCode":"\n  if (\n    !pkg.devDependencies?.['@capacitor/assets'] &&\n    !pkg.dependencies?.['@capacitor/assets']\n  ) {\n    const pm = createInstance(srcCapacitorDir)\n    if (typeof pm === 'string') {\n      warn(pm)\n      return false\n    }\n\n    const success = await pm.installPackage('@capacitor/assets', {\n      isDevDependency: true,\n      allowBuilds: true\n    })\n\n    if (!success) {\n      warn()\n      warn('Failed to install @capacitor/assets. Please do it manually.')\n      return false\n    }\n  }\n\n  if (\n    !pkg.dependencies?.['@capacitor/splash-screen'] &&\n    !pkg.devDependencies?.['@capacitor/splash-screen']\n  ) {\n    const pm = createInstance(srcCapacitorDir)\n    if (typeof pm === 'string') {\n      warn(pm)\n      return false\n    }\n\n    const success = await pm.installPackage('@capacitor/splash-screen')\n\n    if (!success) {\n      warn()","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/icongenie/lib/mount/mount-capacitor.js#L17-L53","documentation":"installCapacitorAssets tries to install the @capacitor/assets npm package as a dev dependency into the project before generating icons/splash screens. If the package manager install reports failure, icongenie warns and aborts that step, asking the user to install manually. It returns false so mounting can react.","triggerScenarios":"Running icongenie generate/mount for Capacitor when @capacitor/assets is not already installed and the underlying `npm/yarn/pnpm install` command exits non-zero (network error, lockfile conflict, permission issue, npm scripts blocked).","commonSituations":"Corporate proxy/firewall blocking the registry; peer-dependency resolution conflicts; read-only node_modules; using a package manager with stricter install behavior than expected.","solutions":["Install it manually: npm install -D @capacitor/assets (or your project's package manager).","Check the earlier install output for the real npm error (network, ERESOLVE, permissions) and fix that root cause.","Re-run the icongenie command after the manual install succeeds."],"exampleFix":"# before: automatic install failed\n# after: install manually then retry\nnpm install -D @capacitor/assets\nicongenie generate -m capacitor","handlingStrategy":"validation","validationCode":"const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));\nif (!pkg.devDependencies?.['@capacitor/assets']) {\n  console.log('Pre-install: npm install -D @capacitor/assets');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-install @capacitor/assets as a devDependency so icongenie skips the auto-install.","Ensure registry access/proxy settings are correct before running asset generation.","Keep the package in the lockfile to avoid repeated resolution in CI."],"tags":["capacitor","npm","dependencies"],"backgroundTag":"dependency-install-failure","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}