Depends on the type of tree snake. Several snakes get called various types of treesnake (Brown Treesnake, Green/Common Treesnake, Green Tree Python and others) and there are many different types. These three examples are all extremely different with very different feed preferences.
If you don't have any idea and are speculating about crickets, it sounds very much like this is a wild caught snake so I'm not going to suggest anything other than letting it go immediately wherever it was caught. If you did buy it and it's captive bred, ask the breeder. Most likely you're talking about either a Brown or Common Treesnake and neither is a good choice for a beginner.