NASA’s last-minute decision to cancel what would have been an historic all-female spacewalk triggered a swift and sardonic reaction on social media — and cast a harsh spotlight on a problem that has long bedeviled the space agency: It doesn’t have enough spacesuits.

Astronauts Anne McClain and Christina Koch were scheduled to venture outside the International Space Station together Friday to swap out some batteries. But NASA announced Monday that, after consulting with McClain, mission managers had decided to shift the assignments “due in part to spacesuit availability on the station.”

McClain learned during a previous spacewalk that a medium-sized “hard upper torso” — the part of the modular suits that covers the chest — fit her best, the agency said. But only one of those could be made ready to be worn on the station by Friday. NASA said it would be worn by Koch.

The decision drew an immediate response on Twitter, with some apparently seeing the cancellation as evidence that women still aren’t full participants in the space program more than three decades after Sally Ride became the first American woman in space.

"NASA= No Available Spacesuit Accessories,” archaeologist Sarah Parcak quipped in a tweet.

“We put a man on the moon but we can’t find a spacesuit that fits a woman by Friday,” tweeted Arianna Huffington.

Hillary Clinton tweeted simply, “Make another suit.”

Beyond the issue of possible sexism within the space program, experts said the canceled walk illustrates NASA’s shortage of spacesuits — a problem that was described in detail in a 2017 inspector general report.

“On the International Space Station, there are just four spacesuits available out of a total of just 11 spacesuits that NASA has in total for the ISS,” said spacesuit expert Pablo de Leon, a professor of space studies at the University of North Dakota. “This is due to the fact that the spacesuits that are now used are the same ones that were used during the space shuttle program.”

NASA’s space shuttles first flew in 1981 and were retired in 2011 — and de Leon said the suits had been designed in the late 1970s.

The agency had planned to make new spacesuits for astronauts to wear on spacewalks from the space station but funding was never allocated, according to de Leon.

The suits are much more than airtight coveralls with helmets and gloves. They’ve been described as miniature spaceships, capable of enabling astronauts to move around comfortably while protecting them from temperature extremes and the airless vacuum of space.

They weigh more than 150 kilograms apiece (about 331 pounds), de Leon said, and their cost is as astronomical as the environment in which they’re worn. “If you could put a price tag on each suit, it is $22 million,” he said.

Developing and fabricating additional suits for use on the space station would take several years, he added, so doing so might not make sense since the station itself will probably be retired in 2024.

McClain is now tentatively scheduled to perform a spacewalk with Canadian Space Agency astronaut David Saint-Jacques on April 8.

NASA didn't specify the other factors that contributed to the decision to alter the spacewalk schedule and didn't reply to an email requesting more information in time to be included in this article.

Former NASA astronaut Greg Chamitoff, who is now a professor of aerospace engineering at Texas A&M University, said in an email that NASA had "painted itself into a corner by all the public announcements about the two-female EVA," or extravehicular activity. He said the agency "probably should have delayed the spacewalk" to prepare the other suit.

"Obviously, the work took priority over the accomplishment of a two-female EVA and now NASA has to endure the public backlash instead of the enthusiasm they hoped for," he said. "A shame."

Want more stories about spaceflight?

SIGN UP FOR THE MACH NEWSLETTER AND FOLLOW NBC NEWS MACH ON TWITTER, FACEBOOK, AND INSTAGRAM.