This is a bit of a frame challenge, but I think it's appropriate as you indicate enjoying the work you do and the company you're with. That is not nothing. You indicate that you are homesick, but don't indicate what you've done to address that before taking what you perceive to be the 'easier path'.
While I don't disagree with the answers provided thus far, I would encourage you to ensure that you've seriously addressed the causes of your homesickness and try to alleviate that.
I think my personal experience on the matter is relevant as I moved from New Jersey (home for 24 years) to Florida out of college. I was crazy homesick for the first 2 years and did not conceive that this was a real thing (I felt a bit physically ill); especially during autumn as it was my favorite season.
Things that helped me quite a bit included:
- Making it a point to visit home at least once or twice a year (this
was easy as I could fly between major hubs);
- Keeping in touch with friends and family via phone calls and social media;
- Making a deliberate and concerted effort to develop a new social net;
Undoubtedly the hardest of these items is number 3, but it's the most important. If you don't start creating a new social network you're always going to feel lonely and isolated. So whatever your interests are there's probably a Meetup for it, or join a bowling league, or whatever you have to do. Find people you like, invite them to your place, feed them food (learn how to make like one thing and you're pretty much good), and play Mario Kart or whatever; it sounds silly to say but this has consistently been one of my most effective means to promote someone from an acquaintance to an actual friend. All relationships are built on shared experiences, so if you're not sharing experiences with other people then you're not building new relationships and you'll constantly find yourself yearning for the ones you've lost.
If you haven't found yourself doing at least the items on this list, I would STRONGLY urge you to try them before leaving a company you like doing work you enjoy; that can be a very hard combination to get. I know in programming it's pretty normal to jump between careers regularly, but other industries typically like to see longer tenures so if you can address the sources of your homesickness, I think you'll be for the better.