Okay I swear this is the stupidest error I've ever come across.
I am on 1.19.2.
I have seen others use .box when making a block on this version.
I see no reason why it wouldn't exist.
Error occurred while handling event 'StartupEvents.registry': TypeError: Cannot find function box in object CustomMachineBlockBuilderJS[kubejs:copper_solar_panel].