How would I create a central module that all other modules require to access each other

I was trying to make a module that has access to every single other module in the game, and can be accessed by any module in the game to call functions to different modules instead of requiring them.

The central module loops through the game and requires every module, and stores it in the table. However, when other modules try require the central module, it always says that the module was required recursively. Is there any way to get around this?

Is there any reason that it needs to require them? Could you not just do something like this, where it stores access to them but without calling them:

local mt = setmetatable({}, __index = mt)
local modules = Modules:GetChildren()

function mt:FetchModule(m)
   return require(modules(m))
end

return mt

I don’t want a function to get the modules. I’m looking to index them and get the required module.

CentralModule.SomeModule:DoSomething()