{"record":{"id":"e94e664a018eadfa","repo":"quasarframework/quasar","slug":"please-remove-attachmarkup-from-index-html-ins","errorCode":null,"errorMessage":"Please remove ${attachMarkup} from /index.html inside of <body>","messagePattern":"Please remove (.+?) from /index\\.html inside of <body>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/utils/app-files-validations.js","lineNumber":19,"sourceCode":"import fs from 'node:fs'\n\nimport { warn } from './logger.js'\nimport { attachMarkup, entryPointMarkup } from '../plugins/vite.html.js'\n\nexport function appFilesValidations(appPaths) {\n  let valid = true\n\n  const file = appPaths.resolve.app('index.html')\n\n  if (!fs.existsSync(file)) {\n    warn('The file /index.html is missing. Please add it back.\\n')\n    return false\n  }\n\n  const content = fs.readFileSync(file, 'utf8')\n\n  if (content.includes(attachMarkup)) {\n    warn(`Please remove ${attachMarkup} from\n    /index.html inside of <body>\\n`)\n    valid = false\n  }\n\n  if (!content.includes(entryPointMarkup)) {\n    warn(`Please add ${entryPointMarkup} to\n    /index.html inside of <body>\\n`)\n    valid = false\n  }\n\n  return valid\n}\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/utils/app-files-validations.js#L1-L32","documentation":"appFilesValidations detects the legacy Quasar v1 attach markup '<div id=\"q-app\"></div>' hardcoded inside /index.html. In Quasar v2 with Vite, that div is injected automatically by the tooling (transformHtml), so keeping it in the template causes a duplicated mount node; the validation warns and marks the project invalid.","triggerScenarios":"Running quasar dev/build when root index.html still contains <div id=\"q-app\"></div> in <body>, typically after a v1 -> v2 migration; called from #computeConfig via appFilesValidations.","commonSituations":"Upgrading a Quasar CLI v1 project (src/index.template.html contained the div) by copying its body into the new root index.html.","solutions":["Delete the <div id=\"q-app\"></div> line from index.html inside <body>; Quasar injects it at build time.","Keep only the <!-- quasar:entry-point --> comment in <body> as injection point."],"exampleFix":"<!-- before -->\n<body>\n  <div id=\"q-app\"></div>\n  <!-- quasar:entry-point -->\n</body>\n<!-- after -->\n<body>\n  <!-- quasar:entry-point -->\n</body>","handlingStrategy":"validation","validationCode":"import { readFileSync } from 'node:fs'\nif (readFileSync('index.html', 'utf8').includes('<div id=\"q-app\"></div>')) {\n  console.warn('Remove <div id=\"q-app\"></div> from index.html; Quasar injects it')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After v1 -> v2 migration, prune v1-only markup (q-app div) from the template.","Keep only <!-- quasar:entry-point --> as the injection point in <body>."],"tags":["index-html","migration","ssr","validation"],"backgroundTag":"legacy-quasar-markup-in-index-html","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}