{"record":{"id":"53d40b5422f35f46","repo":"quasarframework/quasar","slug":"renderfile-cannot-locate-relativesourcepath","errorCode":null,"errorMessage":"renderFile() - cannot locate ${relativeSourcePath}. Skipping...","messagePattern":"renderFile\\(\\) - cannot locate (.+?)\\. Skipping\\.\\.\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app-vite/lib/app-extension/api-classes/InstallAPI.js","lineNumber":284,"sourceCode":"    })\n  }\n\n  /**\n   * Render a file from extension template into devland\n   * Needs a path (to a file) relative to the path of the file where renderFile() is called\n   *\n   * @param {string} relativeSourcePath (file path relative to the folder from which the install script is called)\n   * @param {string} relativeTargetPath (file path relative to the root of the app -- including filename!)\n   * @param {object} scope (optional; rendering scope variables)\n   */\n  renderFile(relativeSourcePath, relativeTargetPath, scope) {\n    const dir = getCallerPath(1)\n    const sourcePath = path.resolve(dir, relativeSourcePath)\n    const targetPath = this.resolve.app(relativeTargetPath)\n    const rawCopy = !scope || Object.keys(scope).length === 0\n\n    if (!fs.existsSync(sourcePath)) {\n      this.logger.warn(\n        `renderFile() - cannot locate ${relativeSourcePath}. Skipping...`\n      )\n      return\n    }\n    if (fs.lstatSync(sourcePath).isDirectory()) {\n      this.logger.warn(\n        `renderFile() - \"${relativeSourcePath}\" is a folder instead of a file. Skipping...`\n      )\n      return\n    }\n\n    this.#hooks.renderFiles.push({\n      sourcePath,\n      targetPath,\n      rawCopy,\n      scope,\n      overwritePrompt: true\n    })","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/app-extension/api-classes/InstallAPI.js#L266-L302","documentation":"api.renderFile(relativeSourcePath, relativeTargetPath, scope) renders a single template file. This warning means the source file, resolved relative to the directory of the file calling renderFile(), does not exist, so rendering is skipped.","triggerScenarios":"api.renderFile('./tpl.txt', 'src/tpl.txt') where path.resolve(getCallerPath(), relativeSourcePath) doesn't exist — typo, file not published in the extension package, or path mistakenly given relative to the app root.","commonSituations":"Template file missing from the published npm package (omitted from 'files'), filename case mismatch on case-sensitive filesystems (Linux CI), or refactoring that moved/renamed template files.","solutions":["Correct relativeSourcePath so it is relative to the install-script file calling renderFile().","Verify the file exists in the installed extension under node_modules (watch for case mismatches).","If you own the extension, include the file in package.json 'files' and republish.","If a folder was meant, use api.render() instead."],"exampleFix":"// before: path relative to extension root\napi.renderFile('templates/env.txt', '.env.example')\n// after: relative to this install script\napi.renderFile('./templates/env.txt', '.env.example')","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst path = require('path');\nconst src = path.resolve(__dirname, relativeSourcePath);\nif (!fs.existsSync(src)) throw new Error(`template file missing: ${src}`);\napi.renderFile(relativeSourcePath, relativeTargetPath, scope);","typeGuard":"function isTemplateFile(baseDir, p) {\n  const fs = require('fs');\n  const full = require('path').resolve(baseDir, p);\n  return fs.existsSync(full) && fs.statSync(full).isFile();\n}","tryCatchPattern":null,"preventionTips":["Keep source paths relative to the install-script file (use __dirname-equivalent resolution mentally).","Watch filename case — Linux CI is case-sensitive while macOS dev is not.","Ensure single files are listed in package.json 'files'."],"tags":["app-extension","renderfile","missing-file","path-resolution"],"backgroundTag":"missing-template-path","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}