MASSACHUSETTS’ INEVITABLE march toward becoming a wind energy powerhouse suffered a setback recently when the news broke that Avangrid had filed to terminate its contracts to build the 1.2-gigawatt Commonwealth Wind farm off the coast of Martha’s Vineyard. This past week the Massachusetts Department of Public Utilities rejected Avangrid’s bid and it’s claim that it couldn’t deliver the project with the current contract pricing because of current economic conditions. The agency said  the company must honor its existing power purchase agreements with the state’s leading electric utilities.

Expect more chapters in this drama before it’s resolved. Yet it’s indicative of very little other than a single project that ran into an unexpected set of hurdles due to timing. The sky is not falling and the outlook for offshore wind remains strong.

First off, Avangrid had been sounding the alarm about this project in recent months, citing rising supply chain costs and interest rates. In order to avoid these sorts of pitfalls, New York and New Jersey are looking to build inflation adjusters into their offshore contracts. Massachusetts would do well to follow their example. Also, the Commonwealth Wind project was awarded while the Bay State still had its offshore wind project price cap in place. That’s now been eliminated with the passage of the recent state climate bill, meaning that future wind farm bids can more accurately account for their project costs rather than seek to conform to an extremely restrictive state formula.

Simply put, Commonwealth Wind is likely to be a learning exercise for all involved about the potential pitfalls of these projects. We need to learn the lessons fast, however,  if Massachusetts doesn’t want to fall further behind New York and New Jersey, which each have an impressive number of projects in their pipelines. Yet if everyone–developers, utilities, and the state–applies  the lessons from this experience, there’s no reason it should be repeated.

That includes Avangrid. The first instinct many have in these types of situations is to point fingers and assign blame, but in the better part of three decades of public service I never encountered a school, municipal, or housing construction project that didn’t run into some type of unforeseen setback. That’s par for the course, especially when you’re talking about projects that take years to complete.

The full Green Line extension  of the MBTA just opened in December, but in 2015 that project was running way over budget and needed a massive overhaul in order to see it through to completion. Ultimately it came in under budget with the revised plan, meaning the cities of Somerville and Cambridge got their money back, but there were serious questions at that time about whether the project would happen. Fortunately, the state and Gov. Charlie Baker were committed to GLX and all the parties involved worked together to make sure it happened.

We’re in the same position with offshore wind. Faced with the existential threat of climate change, we have to clean up our energy supply. Fortunately, Massachusetts happens to be sitting on the largest potential supply of offshore wind power in the nation. We’re like Texas before the oil boom. We have a massive reservoir of clean, affordable, local energy right off our eastern shore.

Vineyard Wind, the first commercial-scale offshore wind farm in the US, is due to start generating power in 2023. Everyone is going to be pretty excited when that happens, and Avangrid is in charge of that project, too. It’s important to remember progress isn’t always linear, but we are headed toward the right destination.

Also, once we achieve a more critical mass from offshore wind and solar energy production (hopefully by the end of this decade), firms like Credit Suisse are projecting extremely favorable consumer energy prices. That is something we all should appreciate given the recent spike in electricity and home heating prices due to the high cost of natural gas. No longer will turmoil in Eastern Europe or the Middle East turn into an energy crisis here in the Northeast. This is how we achieve true energy independence.

It also means jobs. According to the Massachusetts Clean Energy Center, the state already has more than 14,000 jobs in the clean energy sector. That number will rise dramatically as we increase local energy production and build out the grid to transmit and store it. Governor Baker just awarded $180 million in funds for port facilities and infrastructure to support this new industry.

So, while it is disappointing to see Commonwealth Wind embroiled in contractual upheaval, nothing has changed about the opportunity offshore wind presents for Massachusetts. We are blessed with an abundant, untapped natural resource. We need to learn from this episode, make sure future projects don’t suffer the same fate, and harness the wind blowing just off our coast.

Clean energy remains the future we’re moving toward and the 2020s still profile as a propulsive decade for establishing this industry in the Bay State.

Joseph Curtatone is the president of the Northeast Clean Energy Council and the former mayor of Somerville.