quasarframework/quasar · info

${assetRelativePath} already exists.

Error message

${assetRelativePath} already exists.

What it means

`quasar new <type> <name>` skips generation when the target file already exists, to never overwrite user code. It prints the relative path with a SKIPPED label and continues with the remaining names. This is a non-fatal notice, not an error.

Source

Thrown at app-vite/lib/cmd/new.js:117

]
if (!validAssetTypes.includes(rawType)) {
  showError(
    `Invalid asset type: ${rawType} (valid values: ${validAssetTypes.join('|')})`
  )
}

/** @type {'page'|'layout'|'component'|'store'|'boot'|'ssrmiddleware'} */
const type = typeAliasMap[rawType] || rawType

if (!['js', 'ts'].includes(format)) {
  showError(`Invalid asset format: ${format} (valid values: js|ts)`)
}

function createFile({ targetFile, ext, reference }) {
  const assetRelativePath = relative(appPaths.appDir, targetFile)

  if (fs.existsSync(targetFile)) {
    warn(`${assetRelativePath} already exists.`, 'SKIPPED')
    console.log()
    return
  }

  fse.ensureDir(dirname(targetFile))
  const templatePath = join('templates/app', format, `${type}.${ext}`)

  fse.copy(appPaths.resolve.cli(templatePath), targetFile, err => {
    if (err) {
      console.warn(err)
      warn(`Could not generate ${assetRelativePath}.`, 'FAIL')
      return
    }

    log(`Generated ${type}: ${assetRelativePath}`)
    if (reference) {
      log(`Make sure to reference it in ${reference}`)
    }

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Nothing to fix — the existing file was intentionally preserved; edit it manually if changes are needed.
  2. Delete or rename the existing file if you want the template regenerated.
  3. Use a different name for the new asset.

Example fix

// before
quasar new p Login   # src/pages/Login.vue exists -> skipped
// after
quasar new p Login2  # or delete/merge the existing src/pages/Login.vue
Defensive patterns

Strategy: validation

Validate before calling

const target = 'src/pages/MyPage.vue';
if (fs.existsSync(target)) console.log('skip: already exists');

Prevention

When it happens

Trigger: Running `quasar new p MyPage` when src/pages/MyPage.vue (or the exact target path including extension) already exists (new.js createFile).

Common situations: Re-running a scaffolding script after a partial failure; naming collisions with existing components/pages; re-running the same `quasar new` command with multiple names.

Related errors


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