{"record":{"id":"f749ba5a10566770","repo":"oxc-project/oxc","slug":"out-of-memory","errorCode":null,"errorMessage":"out of memory","messagePattern":"out of memory","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/oxc_allocator/src/arena/utils.rs","lineNumber":112,"sourceCode":"    debug_assert!(divisor.is_power_of_two());\n    unsafe {\n        let addr = ptr.addr().get();\n        let aligned = round_up_to_unchecked(addr, divisor);\n        let delta = aligned - addr;\n        ptr.add(delta)\n    }\n}\n\n/// Wrapper around `Layout::from_size_align` that adds debug assertions.\n#[inline]\npub fn layout_from_size_align(size: usize, align: usize) -> Result<Layout, AllocErr> {\n    Layout::from_size_align(size, align).map_err(|_| AllocErr)\n}\n\n#[inline(never)]\n#[cold]\npub fn oom() -> ! {\n    panic!(\"out of memory\")\n}\n","sourceCodeStart":94,"sourceCodeEnd":114,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_allocator/src/arena/utils.rs#L94-L114","documentation":"The companion diagnostic of oxlint's vue/require-default-export rule (crates/oxc_linter/src/rules/vue/require_default_export.rs). It fires when a `.vue` file's plain `<script>` block calls `defineComponent(...)` or `Vue.component(...)` — creating a real component — but never default-exports it. Because a component object clearly exists, the rule reports the more specific 'Component must be the default export.' instead of the generic message; such SFCs render nothing in Vue 3.","triggerScenarios":"Patterns like `export const component = defineComponent({})` (named export instead of default) or `const component = Vue.component('foo', {})` with no export — in a .vue file with a plain `<script>`, no default export in the module record, and no `<script setup>` block.","commonSituations":"Teams habitually using named exports; extracting the component into a variable before exporting; migrating from Vue 2 global registration (Vue.component) to SFCs; codemods rewriting `export default` to `export const`.","solutions":["Change the named export to `export default defineComponent({...})`.","If a named export is also needed, keep `const c = defineComponent({...}); export default c;` — the default export satisfies the rule.","For Vue.component registration code, prefer the SFC default export and register via app.component elsewhere."],"exampleFix":"// before\n<script>\nimport { defineComponent } from 'vue';\nexport const component = defineComponent({ /* ... */ });\n</script>\n\n// after\n<script>\nimport { defineComponent } from 'vue';\nexport default defineComponent({ /* ... */ });\n</script>","handlingStrategy":"validation","validationCode":"// flag defineComponent/Vue.component without a default export in a plain <script>\nconst m = sfc.match(/<script(?![^>]*setup)[^>]*>([\\s\\S]*?)<\\/script>/);\nif (m && /\\bdefineComponent\\s*\\(|\\bVue\\.component\\s*\\(/.test(m[1]) && !m[1].includes('export default')) {\n  throw new Error('component must be the default export');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default-export the component in every .vue file; reserve named exports for .ts modules.","Write `export default defineComponent({...})` as the final statement of the script block.","Enable vue/require-default-export in CI to catch codemod regressions."],"tags":["vue","oxlint","lint","sfc","default-export","definecomponent"],"backgroundTag":"vue-missing-default-export","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"}