When state officials built and equipped the biggest solar panel factory in the Western Hemisphere, they thought they were buying into an industry that would keep growing and growing, putting Buffalo on the cutting edge of the 21st Century economy.

It may turn out that way, but right now the solar industry is in a slump – and Buffalo is feeling it.

Solar energy is still likely to be part of a growing renewable energy future, but the Tesla Inc. solar panel factory in Buffalo is facing a different market than when state officials made the $750 million investment in the Riverbend plant the centerpiece of Gov. Andrew M. Cuomo's Buffalo Billion initiative.

After years of fast-paced growth, the residential solar market is expected to shrink for the first time ever in 2017 and grow at "a limited pace" in 2018, according to analysts at GTM Research. State regulators have chipped away at the incentives for residents and businesses to go solar. Falling natural gas prices have made electricity cheaper, reducing the savings from switching to solar.

Tesla is changing, too.