Drivebelt problem

I have a '99 Nissan Frontier 4cyl. p’up and the air conditioner kept going off. The truck has three drivebelts, all inline. The first is Crankshaft to the Power steering pump , the second goes from Crankshaft to the water-pump & the alternator and the third one goes to the air-conditioning compressor; the one that keeps coming off my truck & shutting down the A.C. I replaced it three times and the last time it went off within a couple of miles. I know the crankshaft and the A.C. compressor pulley’s are out of line and believe that’s my problem. A mechanic friend of mine looked at it and said he thought it was something called a belt-leveler that keeps all the belts from slipping off. He wanted $550 to fix it. Does anybody have a clue as to the problem because if it’s the crankshaft pulley I don’t see a way to fix it & nobody else has ever heard of a belt-leveler?

“I know the crankshaft and the A.C. compressor pulley’s are out of line and believe that’s my problem.” - OP

Sounds like the real answer is to fix whatever is causing the pulleys to be out of line. Bent bracket? Wrong bracket? Incorrect AC compressor? Shims needed? Can you figure out how it got out of line in the first place?

Do the pulleys visually LOOK out of line?

May I suggest the AC compressor is locked up or the AC clutch has failed? Can you watch the belt fly off while a buddy turns on the AC so you can see what happens? If the AC compressor is locked up, it may just throw the belt off or if there is a wobble in the AC clutch, same thing. Or maybe the bracket is cracked so that when a load is put on the AC belt, it flexes and the belt flies off. Use a safety face shield, please. Getting face-slapped by a fan belt wouldn’t be fun.