People aren t always careful about placing electrical boxes especially when installing fixtures with wide bases.
Light fixtures that do not require junction box.
Scott if the new exterior light fixture has a built in junction box or an enclosure where the wiring connections can be made and protected then you would not need to install a junction box.
Light fixture wiring if the new light fixture has the wire leads hanging out of the housing and there is no provision for internally containing and.
The boxes made without metal are pvc or plastic.
Metal boxes are usually made of aluminum steel or cast iron.
What i d do in this admittedly awkward scenario is use a surface mounted pancake box screwed to the stud through the drywall and feed the cable into that through a cableclamp and back of box ko then mount the fixture to the pancake box.
Surface mounted boxes are your friend here.
The electrical box or junction box is a code requirement that was established to prevent fires and other electrical accidents.
How to center a light fixture when the junction box is off center.
Many local building codes require metal junction boxes because they are durable and ensure long lasting performance.
Whenever wires are spliced together in a circuit whether it s to hook up a switch or light fixture or simply to extend the length of a wire the splice connections must be inside a covered junction box.
It ll stick out slightly but it beats sparky splices lighting your studs up.