Islanders goaltender Jaroslav Halak looks on after Bruins center Ryan...

Islanders goaltender Jaroslav Halak looks on after Bruins center Ryan Spooner scores in the second period at Barclays Center on Thursday, Jan. 18, 2018. Credit: Kathleen Malone-Van Dyke

There are no shortcuts for the Islanders right now, no ways for them to get around a solid, rolling team like the Bruins. They did get Josh Bailey back on Thursday, but with a battered lineup that still was missing five regulars — and with a team that has leaked goals all season long — they had to be strong all game.

They were good in the first period, but a couple of unlucky bounces in the second sent the Islanders reeling. The 5-2 loss at Barclays Center was their third to the Bruins in the last 40 days and left the Isles 3-7-0 in their last 10 games, still staring up at the Eastern Conference playoff picture.

“To give ourselves a chance, we have to play the right way the whole game,’’ Ryan Pulock said. “We got away from that in the second and it cost us.”

The Bruins, who haven’t lost in regulation in their last 15 games (11-0-4), had played the night before and looked like it through the first period. The Islanders had Boston penned in its own end for long stretches and Jordan Eberle got the Isles on the board at 7:35, converting a nice feed from Mathew Barzal after Brandon Carlo whiffed on a short pass.

Even after Patrice Bergeron tied it at 13:41 following an Islanders turnover in the neutral zone, Doug Weight liked where his team was after 20 minutes.

He liked where they were through the second period, too. That middle period has been brutal for the Islanders the last three weeks.

“The first two periods were excellent,” Weight said. “You’re in one. [But] there’s a little bit of fragileness, we’re young out there, and it gets to be 3-1 . . . ”

How it got to be 3-1 was frustrating for Weight and his team. Rookie Tanner Fritz beat David Krejci on a defensive-zone draw, but the puck bounced over Jason Chimera’s stick, off Pulock and down to Ryan Spooner, whose quick backhand eluded Jaroslav Halak to give the Bruins the lead.

On the lone Bruins power play of the night, Adam Pelech blocked Torey Krug’s slapper and the puck bounced twice to Bergeron, who whipped it over Halak. That last goal made it a 20-7 margin for Isles opponents in the second period in the last nine games.

“They get a couple quick ones and you feel like you’re chasing the game,” Bailey said. “Sometimes those things happen.”

What can’t happen and what left Weight a little disappointed was the third.

The Islanders had both their power plays in the opening seven minutes of the period, but all those did was take the life out of the team and Barclays Center — at least until Bergeron completed his hat trick at 3:45, drawing a dozen or so hats from the visitor-friendly crowd of 11,803.

John Tavares scored his 25th off Bailey’s feed at 14:24, but Boston’s Brad Marchand scored with 1:01 left.

The Islanders managed only five shots on goal in the third and just five attempts at even strength against what should have been a tired Bruins team.

“You need to work in this league, every shift,” Weight said. “The teams that have 60, 55 points, they’re working hard nine out of 10 shifts. We’re at 7 ½ right now and it’s costing us.”

More Islanders

Newsday LogoCritical LI Information You NeedDigital Access$1 for 5 months