errors and warnings / names / E1015
E1015 error
Module not found
- area
- names (x1xxx)
- fails the build
- yes
- in plain Lua files
- reported as W1015
The module an import names can't be found: no file at that path (tried with
.wowlua, .d.wowlua, .lua and /init.wowlua), an unknown
standard-library module (wowlua:…), a package that isn't in the
manifest's dependencies, or a relative path that leaves the source root.
Check the path (./ and ../ are relative to the importing file, / to
src/) and the dependency list.
Example
import clamp from "./math"print(clamp(5, 0, 1))import clamp from "./math"print(clamp(5, 0, 1))export function clamp(v: number, lo: number, hi: number): number return math.max(lo, math.min(hi, v))endThe compiler reports it like this:
error[E1015]: module `./math` not found ┌─ src/main.wowlua:1:19 │ 1 │ import clamp from "./math" │ ^^^^^^^^ here
Related codes
| code | message |
|---|---|
| E1013 | Module specifier case does not match the file on disk |
| E1012 | Module has no export with this name |
Offline
$ wowlua explain E1015 E1015 (error): Module not found