Yes you can, but the solar panels need to be safely detached first.
Your solar panels are fastened straight into your roof deck, so a roofer can't just tear off shingles or replace decking underneath an active array without damaging the panels, the roof, or both.
The fix is what the solar industry calls a detach and reset. Your system comes off before roofing starts, gets stored safely on-site, and goes back on — fully tested — once the new roof is complete.






