Skip to content

New require semantics not working properly in Luau CLI #1816

@jiwonz

Description

@jiwonz

Abstract module paths and init.luau semantics as currently implemented do not work properly with Luau CLI (via luau.exe <script path>)

The code:

-- example/init.luau
require("@self/a")
-- example/a.luau
return {
    a = "a",
}

The error:

❯ luau ./example/init.luau
./example/init:1: error requiring module "@self/a": could not resolve child component "a"
stacktrace:
[C] function require
./example/init:1

the code structure(the picture attached below):
Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions