{"record":{"id":"a06b57dca5029b2c","repo":"tauri-apps/tauri","slug":"does-not-exist","errorCode":null,"errorMessage":"{:?} does not exist","messagePattern":"(.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-build/src/lib.rs","lineNumber":47,"sourceCode":"\nmod acl;\n#[cfg(feature = \"codegen\")]\nmod codegen;\nmod manifest;\nmod mobile;\nmod static_vcruntime;\n\n#[cfg(feature = \"codegen\")]\n#[cfg_attr(docsrs, doc(cfg(feature = \"codegen\")))]\npub use codegen::context::CodegenContext;\n\npub use acl::{AppManifest, DefaultPermissionRule, InlinedPlugin};\n\nfn copy_file(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<()> {\n  let from = from.as_ref();\n  let to = to.as_ref();\n  if !from.exists() {\n    return Err(anyhow::anyhow!(\"{:?} does not exist\", from));\n  }\n  if !from.is_file() {\n    return Err(anyhow::anyhow!(\"{:?} is not a file\", from));\n  }\n  let dest_dir = to.parent().expect(\"No data in parent\");\n  fs::create_dir_all(dest_dir)?;\n  fs::copy(from, to)?;\n  Ok(())\n}\n\nfn copy_binaries(\n  binaries: ResourcePaths,\n  target_triple: &str,\n  path: &Path,\n  package_name: Option<&str>,\n) -> Result<()> {\n  for src in binaries {\n    let src = src?;","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-build/src/lib.rs#L29-L65","documentation":"tauri-build's copy_file helper verifies the source path exists before copying binaries, resources, or frameworks; when `from.exists()` is false it throws this error embedding the missing path. It guards against silently producing a bundle without the required assets.","triggerScenarios":"`bundle.resources`, `bundle.externalBin` (sidecars) or frameworks entries in tauri.conf.json point to a path that does not exist on disk at build time (try_build -> copy_binaries/copy_resources/copy_frameworks -> copy_file).","commonSituations":"Typos or wrong relative paths in tauri.conf.json, resources deleted or not generated before build, sidecar binary not built for the current target triple, or building on a machine/CI where the asset was never checked out.","solutions":["Check the printed path against tauri.conf.json `bundle.resources`/`externalBin` entries and fix the path","Build or generate the missing binary/resource before running tauri build","For sidecars, build the external binary for the exact target triple (e.g. app-x86_64-pc-windows-msvc.exe)","Use `${os}`/triple-suffixed names in config so the correct per-platform file exists"],"exampleFix":"// before (tauri.conf.json)\n\"resources\": [\"assets/config.toml\"]  // file missing\n// after\n\"resources\": [\"assets/*\"]  // or create assets/config.toml before building","handlingStrategy":"validation","validationCode":"const cfg = JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));\nconst targets = [...(cfg.bundle?.resources ?? []), ...(cfg.bundle?.externalBin ?? [])];\nfor (const t of targets) if (!fs.existsSync(resolve('src-tauri', t.replace(/\\*.*/,'')))) {\n  throw new Error(`Resource/sidecar path missing before build: ${t}`);\n}","typeGuard":"const isExistingFile = (p: string): p is string => fs.existsSync(p) && fs.statSync(p).isFile();","tryCatchPattern":"try {\n  await copy(from, to);\n} catch (e) {\n  if (String(e).includes('does not exist')) {\n    throw new Error(`Fix bundle.resources/externalBin path: ${e.message}`);\n  }\n  throw e;\n}","preventionTips":["Use globs or directory semantics for multi-file resources","Always build sidecars for the exact target triple before tauri build","Keep resource paths relative to src-tauri and committed to VCS","Dry-run in CI: assert all configured assets exist before invoking the bundler"],"tags":["build","filesystem","tauri-build","missing-file"],"backgroundTag":"file-not-found","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}