{"record":{"id":"c166f33ba96d5c0d","repo":"oxc-project/oxc","slug":"ts5058","errorCode":"TS5058","errorMessage":"The specified path does not exist: '{}'.","messagePattern":"The specified path does not exist: '(.+?)'\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/oxc_type_checker/src/execute/tsc.rs","lineNumber":96,"sourceCode":"        let file_or_directory = to_path(cwd, project);\n        if file_or_directory.is_dir() {\n            // A directory: look for `tsconfig.json` inside it.\n            let config_file = file_or_directory.join(\"tsconfig.json\");\n            if config_file.is_file() {\n                Ok(Some(config_file))\n            } else {\n                // TS5081\n                bail!(\n                    \"Cannot find a tsconfig.json file at the current directory: {}.\",\n                    config_file.display()\n                );\n            }\n        } else if file_or_directory.exists() {\n            // An explicit config file (need not be named `tsconfig.json`).\n            Ok(Some(file_or_directory))\n        } else {\n            // TS5058\n            bail!(\"The specified path does not exist: '{}'.\", file_or_directory.display());\n        }\n    } else if let Some(config_file) = find_config_file(cwd) {\n        if command.files.is_empty() {\n            Ok(Some(config_file))\n        } else {\n            // TS5112: a tsconfig.json is present but source files were also specified.\n            bail!(\n                \"tsconfig.json is present but will not be loaded if files are specified on \\\n                 commandline. Use '--ignoreConfig' to skip this error.\"\n            );\n        }\n    } else if command.files.is_empty() {\n        // TS5081 — `tsc` prints version + help here; we report the missing config instead.\n        bail!(\"Cannot find a tsconfig.json file at the current directory: {}.\", cwd.display());\n    } else {\n        // Source files with no config file anywhere: compile them directly.\n        Ok(None)\n    }","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_type_checker/src/execute/tsc.rs#L78-L114","documentation":"Raised during tsc-style compilation in resolve_config_file: a tsconfig.json was auto-discovered from the current directory, but input files were also passed on the command line. tsc semantics give precedence to explicit file arguments, so the config would be silently ignored; this bail surfaces that conflict instead of compiling with unexpected settings.","triggerScenarios":"Thrown at crates/oxc_type_checker/src/execute/tsc.rs:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the explicit file arguments so the discovered tsconfig.json drives the compilation","Pass --ignoreConfig to intentionally skip config loading and suppress this error","Pass an explicit config file path via --project instead of relying on auto-discovery"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}