In one embodiment, a junction box contains a flange-like portion extending outward from the walls surrounding the perimeter of an open space, and beneath which flange-like portion are protuberances that create an open space next to a back cover or other outer surface of an encapsulated module.