{"record":{"id":"b4a96d581eb10be0","repo":"oven-sh/bun","slug":"this-require-call-is-not-allowed-because-the-trans","errorCode":null,"errorMessage":"This require call is not allowed because the transitive dependency \"{}\" contains a top-level await","messagePattern":"This require call is not allowed because the transitive dependency \"(.+?)\" contains a top-level await","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/bundler/LinkerContext.rs","lineNumber":2001,"sourceCode":"                                    Some(&input_files[parent_source_index as usize]),\n                                    ast_import_records[parent_source_index as usize].as_slice()\n                                        [tla_checks[parent_source_index as usize]\n                                            .import_record_index\n                                            as usize]\n                                        .range,\n                                ),\n                                ..Default::default()\n                            });\n                        }\n\n                        let source: &Source = &input_files[source_index as usize];\n                        let imported_pretty_path = &source.path.pretty;\n                        let mut text = Vec::new();\n                        use std::io::Write;\n                        if imported_pretty_path[..] == tla_pretty_path[..] {\n                            write!(&mut text, \"This require call is not allowed because the imported file \\\"{}\\\" contains a top-level await\", bstr::BStr::new(imported_pretty_path)).expect(\"infallible: in-memory write\");\n                        } else {\n                            write!(&mut text, \"This require call is not allowed because the transitive dependency \\\"{}\\\" contains a top-level await\", bstr::BStr::new(tla_pretty_path)).expect(\"infallible: in-memory write\");\n                        }\n\n                        // Split-borrow with `source`/`record` (parse_graph backref\n                        // slices) — `log_disjoint` returns the disjoint backref.\n                        self.log_disjoint().add_range_error_with_notes(\n                            Some(source),\n                            record.range,\n                            text,\n                            notes.into_boxed_slice(),\n                        );\n                    }\n                }\n            }\n        }\n    }\n\n    pub(crate) fn should_remove_import_export_stmt(\n        &mut self,","sourceCodeStart":1983,"sourceCodeEnd":2019,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/bundler/LinkerContext.rs#L1983-L2019","documentation":"Error \"This require call is not allowed because the transitive dependency \"{}\" contains a top-level await\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at src/bundler/LinkerContext.rs:2001 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}