{"record":{"id":"3cebe8036df043d9","repo":"tauri-apps/tauri","slug":"couldn-t-recognize-the-folder-as-a-tauri-projec","errorCode":null,"errorMessage":"Couldn't recognize the {} folder as a Tauri project. It must contain a `{}`, `{}` or `{}` file in any subfolder.","messagePattern":"Couldn't recognize the (.+?) folder as a Tauri project\\. It must contain a `(.+?)`, `(.+?)` or `(.+?)` file in any subfolder\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/helpers/app_paths.rs","lineNumber":133,"sourceCode":"\n  lookup(&src_dir, |path| {\n    folder_has_configuration_file(Target::Linux, path) || is_configuration_file(Target::Linux, path)\n  })\n  .map(|p| {\n    if p.is_dir() {\n      log::debug!(\"Found Tauri project directory {}\", p.display());\n      p\n    } else {\n      log::debug!(\"Found Tauri project configuration file {}\", p.display());\n      p.parent().unwrap().to_path_buf()\n    }\n  })\n}\n\npub fn resolve_dirs() -> Dirs {\n  let tauri = TAURI_DIR.get_or_init(|| resolve_tauri_dir().unwrap_or_else(|| {\n    let env_var_name = env_tauri_app_path().is_some().then(|| format!(\"`{ENV_TAURI_APP_PATH}`\"));\n    panic!(\"Couldn't recognize the {} folder as a Tauri project. It must contain a `{}`, `{}` or `{}` file in any subfolder.\",\n      env_var_name.as_deref().unwrap_or(\"current\"),\n      ConfigFormat::Json.into_file_name(),\n      ConfigFormat::Json5.into_file_name(),\n      ConfigFormat::Toml.into_file_name()\n    )\n  }));\n  let frontend = FRONTEND_DIR.get_or_init(|| {\n    resolve_frontend_dir().unwrap_or_else(|| tauri.parent().unwrap().to_path_buf())\n  });\n  Dirs { tauri, frontend }\n}\n\npub fn resolve_frontend_dir() -> Option<PathBuf> {\n  let frontend_dir =\n    env_tauri_frontend_path().unwrap_or_else(|| current_dir().expect(\"failed to read cwd\"));\n\n  if frontend_dir.join(\"package.json\").exists() {\n    return Some(frontend_dir);","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/helpers/app_paths.rs#L115-L151","documentation":"Panic in the Tauri CLI when it cannot locate the Tauri project. resolve_tauri_dir() honors the TAURI_APP_PATH env var, then checks the current directory and ./src-tauri, then recursively walks (default depth 3, adjustable via TAURI_CLI_CONFIG_DEPTH, honoring .gitignore/.taurignore) looking for tauri.conf.json / tauri.conf.json5 / Tauri.toml. Nothing found -> this panic naming the folder it searched.","triggerScenarios":"Running any `tauri` subcommand from a directory that contains no Tauri config within the walk depth; the config folder being excluded by .gitignore; TAURI_APP_PATH set to a wrong directory; monorepo with the src-tauri crate nested deeper than 3 levels.","commonSituations":"Running the CLI from the repo root of a monorepo where src-tauri lives in apps/desktop/src-tauri; .gitignore rules swallowing the generated project dir; CI checking out only part of the repo.","solutions":["Run the CLI from the directory that contains the config (usually src-tauri/) or its parent","Export TAURI_APP_PATH=/abs/path/to/src-tauri (and TAURI_FRONTEND_PATH if needed) so the CLI resolves it explicitly","Raise walk depth with TAURI_CLI_CONFIG_DEPTH, or make sure the config folder is not ignored by .gitignore (add a negation or .taurignore exception)"],"exampleFix":"# before\ncd /repo && npx tauri dev   # panic: Couldn't recognize the current folder...\n\n# after\nexport TAURI_APP_PATH=/repo/apps/desktop/src-tauri\nnpx tauri dev\n# or: cd /repo/apps/desktop/src-tauri && npx tauri dev","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nfound=$(find . -max-depth 4 -name 'tauri.conf.json' -o -name 'tauri.conf.json5' -o -name 'Tauri.toml' 2>/dev/null | head -1)\n[ -n \"$found\" ] || { echo 'no Tauri config found; set TAURI_APP_PATH or cd into src-tauri'; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always invoke the tauri CLI from src-tauri/ or its parent, or export TAURI_APP_PATH in CI","In monorepos, set TAURI_APP_PATH and TAURI_FRONTEND_PATH explicitly once in the pipeline","Make sure .gitignore does not exclude the folder holding tauri.conf.json (bump TAURI_CLI_CONFIG_DEPTH if deeply nested)"],"tags":["tauri-cli","project-detection","config","cli"],"backgroundTag":"project-config-not-found","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}