errors and warnings / names / E1013
E1013 error
Module specifier case does not match the file on disk
- area
- names (x1xxx)
- fails the build
- yes
- in plain Lua files
- reported as W1013
An import's path differs in case from the file on disk ("./Math" for
math.wowlua). Module paths are case-sensitive everywhere: WoW on Windows
would tolerate the mismatch, other systems would not find the file. Write
the path exactly as the file is named.
Example
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))endimport 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[E1013]: `./Math` differs in case from the file `math.wowlua` ┌─ src/main.wowlua:1:19 │ 1 │ import clamp from "./Math" │ ^^^^^^^^ here
Related codes
Offline
$ wowlua explain E1013 E1013 (error): Module specifier case does not match the file on disk