The reason that your code isn't working is that require is a function avaliable in open-os
on an eeprom you have to interface directly with the components.
try:
function getComponent(name)
component.proxy(component.list(name, true)())
end
local m = getComponent("modem")
component.list lists all components with the given name's addresses and type (calling the return value returns the first index's address)
component.proxy gives you a "proxy" of the component using an address
with out a proxy you would have to use component.invoke to call a method on a component