quasarframework/quasar · error

Failed to install @capacitor/assets. Please do it manually.

Error message

Failed to install @capacitor/assets. Please do it manually.

What it means

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.

Source

Thrown at icongenie/lib/mount/mount-capacitor.js:35

  if (
    !pkg.devDependencies?.['@capacitor/assets'] &&
    !pkg.dependencies?.['@capacitor/assets']
  ) {
    const pm = createInstance(srcCapacitorDir)
    if (typeof pm === 'string') {
      warn(pm)
      return false
    }

    const success = await pm.installPackage('@capacitor/assets', {
      isDevDependency: true,
      allowBuilds: true
    })

    if (!success) {
      warn()
      warn('Failed to install @capacitor/assets. Please do it manually.')
      return false
    }
  }

  if (
    !pkg.dependencies?.['@capacitor/splash-screen'] &&
    !pkg.devDependencies?.['@capacitor/splash-screen']
  ) {
    const pm = createInstance(srcCapacitorDir)
    if (typeof pm === 'string') {
      warn(pm)
      return false
    }

    const success = await pm.installPackage('@capacitor/splash-screen')

    if (!success) {
      warn()

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Install it manually: npm install -D @capacitor/assets (or your project's package manager).
  2. Check the earlier install output for the real npm error (network, ERESOLVE, permissions) and fix that root cause.
  3. Re-run the icongenie command after the manual install succeeds.

Example fix

# before: automatic install failed
# after: install manually then retry
npm install -D @capacitor/assets
icongenie generate -m capacitor
Defensive patterns

Strategy: validation

Validate before calling

const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
if (!pkg.devDependencies?.['@capacitor/assets']) {
  console.log('Pre-install: npm install -D @capacitor/assets');
}

Prevention

When it happens

Trigger: 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).

Common situations: Corporate proxy/firewall blocking the registry; peer-dependency resolution conflicts; read-only node_modules; using a package manager with stricter install behavior than expected.

Related errors


AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30). Data as JSON: /api/errors/5882d674cc3d5ffe. Report an issue: GitHub.