Error reference › Import diagnostics
module not found
errorWhat it means
Import resolution tries, in order: built-in native modules (math, json, web, http, fs, db, template), local library paths, and the public registry (auto-download on first use). Exhausting all paths yields this diagnostic.
Trigger condition
An import names a module that cannot be found: not a built-in module, not in `./.mozhi/libs/`, `~/.mozhi/libs/`, or the project tree.
Minimal failing example
import physicsVerified fix
import mathBuilt-in modules always resolve: math, json, web, http, fs, db, template.
What the interpreter prints
error[IMPORT001]: module not found
--> app.mz:1:16
1 | import physics
| ^
|
reason: (the exact problem, with positions)
help: (a suggested fix appears here)
docs: https://crossberry-in.github.io/mozhi-doc/errors/IMPORT001mozhi --json run app.mz to get the same information as
machine-readable JSON (schema mozhi.diagnostics.v1), or --verbose to
also show grouped related diagnostics. See the CLI reference.Suggested fix
Use a built-in module name, or put the library file in `./.mozhi/libs/<name>.mz`, or run `mozhi add <package>` for registry packages.
Related syntax
import statement
Related diagnostics
Reference links
Limitations
Auto-download needs network access; offline environments only see local+built-in modules (the plain message lists the paths that were tried).