expression, godan verb (-u)
have a terrible time; go through a hard experience
Used when someone suffers an unpleasant, difficult, or painful experience. Often implies the situation was unexpected or undeserved. The phrase is a set expression combining えらい (terrible) with 目にあう (to experience something bad).
See also: 目にあう
昨日の嵐でえらい目にあった。
I had a terrible time in yesterday's storm.
彼は詐欺
Apparently he fell for a scam and went through a hard time.