{"record":{"id":"0b9ea10e9d919bc0","repo":"oxc-project/oxc","slug":"named-import-imported-name-not-found","errorCode":null,"errorMessage":"named import {imported_name:?} not found","messagePattern":"named import (.+?) not found","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/import/named.rs","lineNumber":12,"sourceCode":"use oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{\n    context::LintContext,\n    module_record::{ExportEntry, ExportImportName, ImportImportName, ModuleRecord, NameSpan},\n    rule::Rule,\n};\n\nfn named_diagnostic(imported_name: &str, module_name: &str, span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\"named import {imported_name:?} not found\"))\n        .with_help(format!(\"Does {module_name:?} have the export {imported_name:?}?\"))\n        .with_label(span)\n}\n\nfn has_default_export(module_record: &ModuleRecord) -> bool {\n    module_record.export_default.is_some()\n        || module_record.exported_bindings.contains_key(\"default\")\n}\n\nfn is_synthesized_indirect_export_entry(export_entry: &ExportEntry) -> bool {\n    !export_entry.statement_span.contains_inclusive(export_entry.span)\n}\n\nfn is_reexport_of_default_import(\n    module_record: &ModuleRecord,\n    export_entry: &ExportEntry,\n    import_name: &NameSpan,\n    remote_module_record: &ModuleRecord,","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/import/named.rs#L1-L30","documentation":"Fires from import/named when a named import specifier cannot be found in the resolved module's export record. The diagnostic is built in named_diagnostic with a help asking whether the source module actually exports that name; the module record for the imported file lacks the requested named export.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/import/named.rs:12 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the typo in the imported name","Import the name that the module actually exports","Add the missing export to the source module","Use the default import if that is what the module provides"],"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"}