1993 maxima slowly loses power the lights will dim then the engine quickly dies sometimes it will start right up. this may happen once or twice in a row then nothing for a month?

CHECK OUT YOU ALTENATOR FIRST .DIMMING LIGHTS ARE A SIGN OF THE ALTENATOR.YOU CAN CHECK IT YOURSELF THE OLDSCHOOL WAY BY PLACING A SCREW DRIVER ON THE BACK SIDE OF THE ALTENATOR IN THE CENTER ON THE RUSTY DARK DOT THAT IS A MAGNET IF THE SCREW DRIVER STICK THE MAGNETIC FIELDING IS STILL GOOD........BUT STILL GET IT TESTED...IF YOU GO TO ADVANCE AUTO PARTS THEY WILL COME OUT INTO THE PARKING LOT AND DO A FIELDING TEST FOR FREE.IF ITS NOT THE ALTENATOR IT COULD BE A RELAY OR THE CENTRAL COMPUTER SYSTEM HOPE ITS NOT.....................HOPE THIS HELPS...................BUDDY MACK