Need to know what year, make, model and engine to help you.
There are a couple of reasons why a lawnmower will not stay running or not getting fuel. The carburetor may be clogged up or the lawnmower gas may have water in it.
It sounds like your carburetor is getting clogged.
It out of gas...
Sounds like no gas is getting to the carb. Fuel pump maybe.
Its out of gas
If your car has the check engine on it could be your fuel pressure regulator located on your fuel rail..
it starts without gas?
usually it's bad gas (not the right mixture ---or stale from last year) the grass is too tall and cord is getting wrapped the base of the weeds
have ur idle control motor checked if sounds like its not functioning its (aka) ICM
Possible buildup in the line from the gas tank to the carb.
The pathfinder may be running to rich. It could be the 02 senser,air flow senser, or bad gas
Try the idle control