v0.13.8
errors and warnings / names

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

× failssrc/main.wowluawowlua
import clamp from "./Math"print(clamp(5, 0, 1))
src/math.wowluawowlua
export function clamp(v: number, lo: number, hi: number): number    return math.max(lo, math.min(hi, v))end
✓ compilessrc/main.wowluawowlua
import clamp from "./math"print(clamp(5, 0, 1))
src/math.wowluawowlua
export function clamp(v: number, lo: number, hi: number): number    return math.max(lo, math.min(hi, v))end

The 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
codemessage
E1015Module not found
E1038asset() path is not a package asset (or case mismatch)

Offline

terminal
$ wowlua explain E1013
E1013 (error): Module specifier case does not match the file on disk

source on GitHub ↗