Ruta graveolens  ·  notes from a language experiment  ·  cultivated since 2025

E0704: Module not found

CodeCategoryStability
E0704IntrinsicPermanent

Explanation

The one candidate file selected by an @import specifier was not present in the compilation's source graph. Extensioned paths name that exact file; extensionless paths name only a directory facade.

Likely cause

The path is misspelled, the file was not supplied to the compiler, the path is relative to a different importing file than expected, or .rue was omitted when a file module rather than a directory facade was intended.

Examples

Import a missing file module

// --- main.rue
fn main() -> i32 {
    let helper = @import("helper.rue");
    helper.answer()
}

Provide the file at the selected path

// --- main.rue
const helper = @import("helper.rue");
fn main() -> i32 { helper.answer() }
// --- helper.rue
pub fn answer() -> i32 { 42 }

References