v0.13.7
errors and warnings / names

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

× failswowlua
import clamp from "./math"print(clamp(5, 0, 1))
✓ 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[E1015]: module `./math` not found
  ┌─ src/main.wowlua:1:19
  │
1 │ import clamp from "./math"
  │                   ^^^^^^^^ here
codemessage
E1013Module specifier case does not match the file on disk
E1012Module has no export with this name

Offline

terminal
$ wowlua explain E1015
E1015 (error): Module not found

source on GitHub ↗