If it's for a trusted loved one or friend, give them the universal gift card....cash. Include a personal note of your intent. Gifts cards have become better, but are still restrictive.
If you're not a member, you can't buy anything there, including their cash cards, so your only option is to buy a VISA gift card as Pankaj said.
Non members can't buy costco cash or gift cards. Just get a VISA gift card that would work there.
Thanks! Your answer is awaiting moderation.