lune build - require throws an error for standalone binaries
v0.10.1
lune run main.luau works normally but running the standalone binary with require does not work.
> Make the file "main.luau" with the content require("./anotherluaumodule")
> Build the file lune build main.luau
> Execute the binary
Apparently lune std library "@lune/..." does work.
This used to work in previous versions of lune what do I need to do?
The lune build command currently doesn't package other required modules. If you want other modules in your built executable, use a luau packager like darklua.
Looks like a regression from migrating to "proper" Luau require-by-string mechanisms. The runner for standalone / built executables runs with a custom chunk name instead of a file path, and require-by-string now always needs some kind of file path to work. We can probably set it to the current working directory and have this work again 🤔