Why is my check engine light on?car is running great. on 2010 Dodge Charger

Had the computer read and it came up maybe a vacuum leak. My gas cap does pop off sometimes. Car is running great. This happened last summer stayed on for a week then went off. Now it came on again and don't know what the problem is.

4 answers 3 comments
Ok so my check engine was coming on and off, I got it read when it was on and it read cilynder 1 mis Fire. I've replaced my plenum gaskets, spark plugs, ignition coils, and sensors. Engine light came on after that, got it read again and read a vacuum leak, got that taken care of a few days ago. Check engine light just came back on. What could be the problem?
probably the gas cap is the problem, without the check engine light code its just guessing. make sure the cap is correctly installed when refueling.
I think it is something small like the gas cap because when I left the house yesterday the light was off. I have the codes and I'll post them for you when I can. Thanks so much for responding. I was happy to see the light off which makes me think it is nothing serious. :-)
SCAN CODES AND POST SO WE CAN ADV
I have the codes I'll post them for you but when I got in my car yesterday the light was off. I was happy which makes me think it is something small like the gas cap. :-)
Is it the original cap? Have seen some aftermarket's that dont fit so good. Do you know if it had an EVAP code?
Yes it's the cap that came with the car when I got it. Yesterday when I left the house my light was not on anymore. Weird but in happy. :-)