oven-sh/bun · error · OutputFileListError

NoSourceMapsOrBytecode

Error message

NoSourceMapsOrBytecode

What it means

Error "NoSourceMapsOrBytecode" thrown in oven-sh/bun.

Source

Thrown at src/bundler/linker_context/OutputFileListBuilder.rs:44

//!    If we maintain the property that `outputIndexForChunk(chunk[i]) == i`
//!    then we don't need to do any allocations or extra work to get the output
//!    file for a chunk.

use crate::mal_prelude::*;
use crate::options::{self, Loader, OutputFile};
use crate::{Chunk, LinkerContext};
pub(crate) struct OutputFileList {
    pub(crate) output_files: Vec<options::OutputFile>,
    pub(crate) index_for_chunk: u32,
    pub(crate) index_for_sourcemaps_and_bytecode: Option<u32>,
    pub(crate) additional_output_files_start: u32,

    pub(crate) total_insertions: u32,
}

#[derive(thiserror::Error, Debug, Clone, Copy, PartialEq, Eq, strum::IntoStaticStr)]
pub enum OutputFileListError {
    #[error("NoSourceMapsOrBytecode")]
    NoSourceMapsOrBytecode,
}

impl OutputFileList {
    pub(crate) fn init(
        c: &LinkerContext,
        chunks: &[Chunk],
        _unused: usize,
    ) -> Result<Self, crate::Error> {
        let (length, supplementary_file_count) =
            OutputFileList::calculate_output_file_list_capacity(c, chunks);
        let mut output_files: Vec<options::OutputFile> = Vec::with_capacity(length as usize);
        output_files.resize_with(length as usize, OutputFile::zero_value);

        Ok(Self {
            output_files,
            index_for_chunk: 0,
            index_for_sourcemaps_and_bytecode: if supplementary_file_count == 0 {

View on GitHub (pinned to 8c5296ac45)

When it happens

Trigger: Thrown at src/bundler/linker_context/OutputFileListBuilder.rs:44 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/4e73aa930a9eba38. Report an issue: GitHub.