Shares of Kroger plunged Tuesday after the company's earnings showed that its investments in tech and delivery services are taking a bigger bite out of its 2019 profits than expected, but it isn't the only grocery chain struggling to make e-commerce work.

"We're embracing this idea of omnichannel, but no one understands how we're going to make any money," Wolfe Research analyst Scott Mushkin said on CNBC's "The Exchange."

Ever since Amazon acquired Whole Foods in August 2017, grocers have been forced to step up their tech investments to avoid losing customers to the e-commerce giant.

"The challenge we have, and it's a huge, huge challenge, is Amazon is re-defining the consumables industry," Mushkin said.

Kroger has struck up a number of partnerships with companies like Microsoft and Walgreens to learn more about its customers and bring its groceries to more people. Last May, it took a 5 percent stake in British online retailer Ocado in exchange for an exclusive deal for its grocery service. The efforts have paid off, with digital sales increasing by 58 percent during its fourth quarter. Additionally, 91 percent of its customers can pick up their groceries or have them delivered.

On Tuesday, the Cincinnati-based company said it's forecasting fiscal 2019 earnings between $2.15 and $2.25 per share, missing Wall Street's estimates of $2.26 per share. Excluding mergers, acquisitions and buying leased facilities, the grocer plans to spend as much as $3.2 billion in fiscal 2019 on investments.

Fellow retail titan Walmart has been focusing on its own grocery business, with plans to bring delivery to 1,600 locations by the end of fiscal 2020. On its fiscal fourth-quarter conference call, the company said it expects losses in digital sales to accelerate this year because it spending more on its infrastructure, labor, online grocery and innovation hub Store No. 8.

And it isn't just the newcomers who are struggling. Mushkin also cited Peapod, owned by grocery group Ahold Delhaize, as one example of an online grocery delivery service that had disappointing results, despite being around for several decades.

For its part, Amazon is now following the lead of old-school grocers. The Wall Street Journal reported last week that the company is planning to open dozens of grocery stores in several U.S. cities.