"Unknown require: unspported path" error on seemingly valid use case

Hello. I am fighting my type checker (UseNewLuauTypeSolver enabled), and it does not like this require path.
image

Here is the return value for the GetUi module:

Does Roblox really need a direct path like this? Is there a way around this error? I want to access my GUI along with my modulescripts in it, but this type error disables the solver on the needed requires.

To note, roblox is okay with this, even though it is pretty much the same situation. I am using a more complex access of data, but I am casting it to my ui from StarterGui.
image

If absolutely necessary, is it worth it to shove my clientside framework in ReplicatedStorage?

1 Like

When you call get() and then access .Lib.Keybinds, the most specific type you can get is just ModuleScript and there is no way to know that it is specifically the keybinds module

You have to use a path but i think they also support FindFirstDescendant and FindFirstAncestor

Another hacky solution is you can cast the require result manually to get rid of the error and get autocomplete

local Keybinds = require("unsupported keybinds path") :: { ["a"] = 1 }
1 Like