What the hell?!
I took today off to install a new closet door that I stained, polyurethaned, and cut to size. It was too narrow. I measured the opening so many times compared to the old door, but never factored in the old frame compared to the new prehung frame. And I already destroyed the old frame to prep for the new door install. So now I have a dumbass 22" opening and will probably have to custom order something for $400+.
And I planted the 10 trees.
I'm looking forward to going back to work tomorrow so I can relax.
How undersized is the door blank in width?
Was the blank pre-mortised for the hinges?
Does it still hit the stop at the top, bottom, and other side of the jamb?
Does the door swing into the closet or open outwards? (i.e., with the door closed, looking at it from the outside, is the visible perimeter the jamb or the stop?
How much of a stickler are you / your wife for aesthetics / perfection?
Could you temporarily make due now then replace it when you need to sell?
It should be possible to use two spacers of equal thickness (whatever your gap is), and probably about equal width (~1"-1.25"). Build out the stop (the thin strip the door seats against in the jamb when the door is closed) by the same thickness you build out the jamb to make up for the undersized door blank width.
I suppose the proper way to fix it is to remove the pre-hung frame / jamb / casement and cut a spacer to sister/scab to the jack stud. Or, use two spacers one on each jack stud left and right if it's a large gap and you're a stickler for symmetry.
I wouldn't order a custom. I'd just order another, new, larger blank and trim the width down. Use your "botched" blank as a table top or workbench top, or whatever (unless perhaps it's a raised field and panel and not flat). Mortising the hinges can be a challenge, but they have rigid plastic templates you can either use with a router, or mark the door and use a chisel.
Memories from 25 years ago... Replaced the (6) hollow core / luan door blanks with solid field-and-panel blanks in my wife's house after we married (sold my house, moved into hers). I had to mortise all the hinges, cut them to length, etc. I made the mistake of cutting one to the carpeted height length instead of leaving it longer for the tiled bathroom. Had a good 3/4" gap or more under the door instead of a shorter clearance. Couldn't adjust it / swap with another because I had mortised the hinge and latch / striker elevations and drilled for the knob/lock first. Four more houses and a new wife later, I'm still willing to fuss with doors but I'm a lot more cautious about sequence of work and measurements. A pre-hung, primed door assembly is actually quite a precision-toleranced assembly. (My brother was quality manager at a custom window manufacturer years after my "This Old House" foray.)
edit: Another "trick" I've done is to comb the moulding section at your local blue or orange big-box store (or whatever you use). They will inevitably, eventually, have pre-hung doors which are damaged / destroyed / busted into pieces in shipment or while they are in their shelve stock. Get the "right" clerk (someone who knows their trade, not some random person) to mark down the section(s) from the busted jamb you need to scrap lumber prices - a couple bucks a board. They'll recognize the assembly is useless and not salvageable. The vertical pieces likely won't matter whether it's a 2-0 vs. 2-4 vs. 2-8, etc., door.
edit #2: Was supposed to fly to Orlando this weekend, essentially "now" until Monday AM zero-dark-thirty return. Quick trip to see wife's folks and her sister. Flight delayed 3 times / 6 hours total so my wife just canceled. Raining here and all down the eastern coast, so can't work outside on my house / porch / garden / yard projects. You can tell I'm itching to be using tools of any kind...