Of all the things New York must do to maintain its mojo — build a new rail tunnel under the Hudson River, increase subway capacity — you would think that building a bus terminal would be easy. A bus terminal is just a building. But replacing the existing terminal on Manhattan’s West Side may be the hardest project the Port Authority of New York and New Jersey undertakes. So hard that extending the subway to New Jersey may end up being part of the solution.

The existing Port Authority terminal on Eighth Avenue, nearly 70 years old, is obsolete. But it’s critical to keeping Manhattan a high-income jobs hub: 130,000 people come into the city via the terminal each day, 23 percent of New Jersey commuters.

Since 1990, commuting from New Jersey has nearly doubled, with 469,000 people — the equivalent of a good-size city’s population — coming via transit every day. Companies would have less reason to pay Manhattan rents without this workforce.

But the plan to build a new terminal is half a decade old. And still in its earliest stages.

The biggest problem: the terminal’s location. The West Side has never been so crowded. The residential population grew 18 percent between 2000 and 2010, to 103,200 people living in less than 2 square miles.

Dozens of new mid- and high-rise apartment buildings have sprung up along Ninth and Tenth avenues, leaving no fallow — or ­little-used — land.

Three-and-a-half-years ago, the Port Authority said it might use eminent domain to seize older shops and apartment buildings, as well as a church, nestled under its ramps leading to the terminal; it was met with such an outcry that it backed down.

Without the mid-20th-century ability to demolish neighborhoods — the way it built the first bus terminal and the old World Trade Center — the Port Authority is stuck with three unpalatable plans. At a public meeting last week, PA officials noted the shortcomings of each.

Under one plan, the Port Authority would “build in place” — i.e., build a new bus terminal where the old one is, and, perhaps, an office tower above it.

The drawback: It’s no small feat trying to run 7,000 buses daily through a terminal under construction for a decade. Figuring out how to do that, the PA notes, “requires further engineering and analysis.” The impact — years of passenger and resident disruption — could make the 2017 “Summer of Hell” for rail commuters look like a breezy spring afternoon.

The two other plans involve converting much of the Javits Center, along the Hudson River, into an underground bus terminal, either as a replacement or a supplement to the existing terminal.

But the Javits Center isn’t Midtown. Commuters would face a subway transfer (via the 7 train stop at Hudson Yards) or a good half-hour walk to core Midtown.

Plus, as PA officials noted, both of these plans require significant disruption. Both need “partial or full” closures of the Lincoln Tunnel during construction. Since most buses coming to the existing Port Authority bus terminal come through the tunnel, these closures would mean trouble for bus passengers, anyway.

One of the Javits plans would require the “raising of the West Side Highway and rerouting of major traffic” during construction. “Raising the West Side Highway” is hardly an afterthought; it would be a massive project by itself.

Just as Brooklyn Heights residents recently (so far successfully) objected to the city building a new highway over their promenade to reroute traffic during the reconstruction of the Brooklyn-Queens Expressway, the people who have either bought or rented apartments along the West Side did not sign up to live next to an elevated highway.

For now, the Port Authority is studiously avoiding another idea: working with the MTA to extend the 7 subway line under the Hudson to New Jersey. Then it could build a bus terminal there, near the Secaucus train station, and use the extra breathing room to renew the Midtown terminal. The PA says it’s thinking about doing this — just not until after 2040.

The Port Authority has stayed away from this plan in part because Jersey commuters don’t like it; they fear losing the direct trip to Midtown forever. But renovating the existing terminal — or not renovating the existing terminal, the more likely outcome under these constraints — is going to imperil that trip, anyway.

Nicole Gelinas is a contributing editor to the Manhattan Institute’s City Journal.