It seems every major carmaker these days is thinking about electric vehicles in some capacity. At one of the world’s largest auto shows in Shanghai this year, several manufacturers boasted their snazzy concept cars and talked up imminent launches.

Electric vehicle sales are rising fast, and battery installation is climbing — largely thanks to China, where battery demand rose more than 175 percent in the first quarter.

Before getting carried away with images of electric cars racing down roadways and crowding out gas guzzlers, there’s a stark reality to consider: Electric vehicles that appeal to swathes of consumers remain few and far between, and those on the road are still too expensive.

How, despite all the grand aspirations and investment, can this cost barrier persist? One of the main culprits is battery technology.

Batteries comprise about half the cost of an electric car. While batteries have gotten less expensive over the past few years, they’re still not cheap enough to put the overall cost of a green car on par with a regular one. In China, the average selling price for batteries at the end of last year was close to $180 per kilowatt hours, down 11 percent from a year earlier but still higher than experts and analysts’ expectations.

Leading battery makers like South Korea’s Samsung SDI Co., SK Innovation Co., LG Chem Ltd., China’s Contemporary Amperex Technology Co. and Japan’s Panasonic Corp. have been pushing toward commercializing next-generation batteries for years. As automakers’ orders rise, these companies have been piling in capital to add capacity as well. Yet the technology isn’t evolving as quickly as anticipated. Operating margins, on average, have been negative, and free cash flows are volatile.

Now all the euphoric expectations are coming back down to earth. Given batteries’ slow development, cars aren’t going as far and can’t be charged as quickly as hoped. Analysts are even raising their forecast for batteries’ average selling price by as much 20 percent in the coming years. That’s despite the prices of materials like cobalt and lithium dropping (albeit from stratospheric levels) because of lackluster demand.

Meanwhile, the chemistry is proving difficult. To make cars go farther, manufacturers have been tinkering with battery composition, trying to increase the ratio of energy-dense nickel in the cathode to 80 percent from 60 percent, while reducing the amount of cobalt and manganese. This process is highly sensitive, which is why trying to make these batteries affordable, functional and safe has been elusive. Nickel also tends to get very hot and batteries can catch fire, delaying efforts to make them commercially viable.

This isn’t to say that electric vehicles have stalled. Goldman Sachs Group Inc. analysts estimate that if “solid progress” in battery technology is made then the cost for existing ones can be reduced by 30 percent to 40 percent at most. But even that’s unlikely to bring prices to a level at which consumers would “actively purchase” such cars without subsidies, they note.

The hard truth is that, like it or not, environmental regulations in major markets such as China and Europe are forcing carmakers into electric cars at any cost. Stock prices and valuations have dropped sharply over the past year for manufacturers of electric vehicles and their parts. It may be time for investors to accept that the shift to electric will be more gradual than full throttle.

Anjani Trivedi is a Bloomberg Opinion columnist covering industrial companies in Asia. She previously worked for the Wall Street Journal.