Retail sales across the U.S. may have broken records this holiday season, but it was already too late for many major companies.

As consumer tastes and shopping habits have changed, many big name retailers have struggled to keep up with the market. Although the economy improved in 2017, this didn't translate into profits for every company.

Part of the reason may be linked to an increasing number of online purchases. According to NBC News, fewer Americans are going out to shop at malls. Meanwhile, web shopping giants such as Amazon are challenging traditional retailers to enhance their own online presence.

Here's a look at 6 of the big name retailers that just couldn't keep up with the competition in 2017, forcing them to file for bankruptcy:

1. RadioShack

The struggling electronics chain sought bankruptcy protection for the second time in just over two years. Back in 2015, Radio Shack teamed up with Sprint, opening mobile carrier shops in 1,200 of its stores.

But that partnership only helped for a time. In March, the retailer announced plans to close 200 stores, saying it would also be evaluating options for other branches. Sprint also said that it would transform hundreds of its remaining partnership location into Sprint-only shops.

2. Payless ShoeSource

In April, the shoe retailer sought Chapter 11 bankruptcy protection. The move aimed to boost the company's balance shoot while also restructuring debt. However, Payless managed to bounce back quickly, emerging from bankruptcy in August after shuttering 673 stores.

3. True Religion Apparel 

According to court filings in July, the jeans designer aims to remain in business but is "seeking a revival" through its bankruptcy filing. As part of the company's strategy to stay open, it announced it would be shutting down an undisclosed number of stores. However, the retailer also sells its iconic jeans through various department stores across the country.

4. Toys R Us

With a whopping $4.9 billion in debt, the toy retail giant filed for bankruptcy in September. When it revealed its Chapter 11 filing, the company said it planned to keep its 1,600 stores open through the holiday season. However, reports have suggested that suppliers were holding back merchandise from the retailer until payments are made.

5. BCBG Max Azria

Even luxury brands have taken a hit in 2017. BCBG Max Azria filed for bankruptcy in February. At the time, the company said it had secured a commitment of up to $45 million in debtor-in-possession financing to be used as working capital, ensuring continued operations during the Chapter 11 process.

The luxury fashion house said it would move to shutter its freestanding Canadian stores, while also consolidating operations in Europe and Japan. The brand also said 120 stores would be closed in the restructuring process.

6. Gymboree

Children's retailer Gymboree filed for Chapter 11 bankruptcy in June. With the decision, the company also announced it would shutter more than 375 of its 1,281 stores. With $900 million in debt, the company said it aimed to restructure through the bankruptcy process, while continuing operations.