{"record":{"id":"c03b2339cc3f8f7b","repo":"quasarframework/quasar","slug":"the-file-index-html-is-missing-please-add-it-bac","errorCode":null,"errorMessage":"The file /index.html is missing. Please add it back.","messagePattern":"The file /index\\.html is missing\\. Please add it back\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app-vite/lib/utils/app-files-validations.js","lineNumber":12,"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","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/utils/app-files-validations.js#L1-L30","documentation":"appFilesValidations checks the project's index.html at startup. Quasar requires /index.html as the Vite entry template; if it is missing, the validation warns and returns false so the dev/build process can abort early instead of failing cryptically inside Vite.","triggerScenarios":"Running quasar dev or quasar build when index.html has been deleted or renamed in the project root; called from #computeConfig via appFilesValidations(appPaths).","commonSituations":"Accidental deletion during cleanup, migration from old Quasar CLI v1 project structure (which used src/index.template.html), or a fresh clone missing untracked template files.","solutions":["Restore index.html to the project root (quasar describe or scaffold from create-quasar to get a copy).","If migrating from Quasar v1, create a Vite-style root index.html instead of src/index.template.html.","Check git status / .gitignore so index.html is tracked in the repository."],"exampleFix":"// restore minimal root index.html\n<!DOCTYPE html>\n<html>\n  <head><title>Quasar App</title></head>\n  <body>\n    <div id=\"q-app\"></div>\n    <!-- quasar:entry-point -->\n  </body>\n</html>","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs'\nif (!existsSync('index.html')) throw new Error('index.html is missing at project root')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Track index.html in git; do not gitignore it.","When migrating from Quasar v1, recreate a root index.html per current docs rather than reusing src/index.template.html.","Add a CI step that checks index.html exists before build."],"tags":["index-html","project-structure","validation"],"backgroundTag":"missing-index-html","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}