so this “external module” requires scene1, yes?
so you’d get that “loop” error if scene1 requires this external module.
(because it implies a never-ending recursive load)
probably time to refactor - ask: why is a non-scene module “calling into” a scene? typically if you need to do something like that you should be passing a reference to the external module of the scene, from the scene. (if that makes sense)
for example, say you have a “helper” routine to populate a scene’s display during scene.create, then give that helper a reference to the scene, fe (incomplete, pseudocode, just to convey idea):
-- in scene1.lua local helper = require("helper") function scene:create() helper:createStuff(self) end -- etc -- in helper.lua local M = {} function M:createStuff(scene) -- scene passes in a ref to itself local stuff = display.newRect(scene.view, whatever...) -- or scene:test() as in your example, etc - do whatever you want with the scene ref return stuff end return M