quasarframework/quasar · info

extendJsonFile() - The extension tried to apply these update

Error message

extendJsonFile() - The extension tried to apply these updates to "${filePath}" file: ${JSON.stringify(newData)}

What it means

This is the companion warning to the parse failure in api.extendJsonFile(). After skipping a non-parseable JSON file, it echoes the exact newData object the extension attempted to merge so the developer can apply the changes manually. It never appears without the preceding 'doesn't conform to JSON format' warning.

Source

Thrown at app-vite/lib/app-extension/api-classes/InstallAPI.js:231

          ? parseJSON(fs.readFileSync(filePath, 'utf8'))
          : {}
        const data = merge({}, existingData, newData)

        fs.ensureDirSync(path.dirname(filePath))
        fs.writeFileSync(
          filePath,
          // if file exists, preserve indentation, otherwise use 2 spaces
          stringifyJSON(data, {
            indent: Object.keys(existingData).length !== 0 ? void 0 : 2
          }),
          'utf8'
        )
      } catch {
        warn()
        this.logger.warn(
          `extendJsonFile() - "${filePath}" doesn't conform to JSON format: this could happen if you are trying to update flavoured JSON files (eg. JSON with Comments or JSON5). Skipping...`
        )
        this.logger.warn(
          `extendJsonFile() - The extension tried to apply these updates to "${filePath}" file: ${JSON.stringify(newData)}`
        )
        warn()
      }
    }
  }

  /**
   * Render a folder from extension templates into devland.
   * Needs a path (to a folder) relative to the path of the file where render() is called
   *
   * @param {string} templatePath (relative path to folder to render in app)
   * @param {object} scope (optional; rendering scope variables)
   */
  render(templatePath, scope) {
    const dir = getCallerPath(1)
    const source = path.resolve(dir, templatePath)
    const rawCopy = !scope || Object.keys(scope).length === 0

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Copy the JSON.stringify(newData) payload from this warning and deep-merge it into the target file manually.
  2. Convert the target file to strict JSON, then re-run the extension install so the merge happens automatically.
  3. If the intended changes are unwanted, ignore this warning after reviewing the payload.

Example fix

// warning shows: {"compilerOptions":{"jsx":"preserve"}}
// after (manual merge into tsconfig.json)
{
  "compilerOptions": { "jsx": "preserve", "strict": true }
}
Defensive patterns

Strategy: fallback

Try / catch

try {
  api.extendJsonFile('tsconfig.json', updates);
} catch {
  // read the logged 'tried to apply these updates' payload and merge manually
}

Prevention

When it happens

Trigger: api.extendJsonFile() catch branch runs (JSON.parse failure on the target file) and newData is a non-empty object; this warning prints JSON.stringify(newData) with the file path.

Common situations: Installing a Quasar App Extension that patches tsconfig.json or .vscode/settings.json — the second warning shows the props (compilerOptions, settings keys) you must merge yourself.

Related errors


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