The Health Department shut down one of the Chick-fil-A’s in Midtown on Wednesday due to a permitting issue — and hungry New Yorkers were devastated.

“What the f–k?!,” fumed a passerby who attempted to enter the location at 46th Street and Sixth Avenue, only to be stopped by a pair of signs saying it was closed.

“Screenshot this s–t,” another said, pointing to the notices.

While it’s unclear exactly when the Chick-fil-A was ordered closed, management said the poultry purveyor would reopen by Thursday.

“Sorry, we are closed due to permitting issues,” they wrote on their notice. “Thank you for understanding.”

City officials told The Post that the 46th Street location had been operating with a denied permit, which was related to submitting an incomplete application. They added that the restaurant took care of the problem Wednesday.

A Chick-fil-A spokesman said the “paperwork issue” was being resolved “ASAP.”

Countless New Yorkers — some of whom had never tried Chick-fil-A before — were spotted outside the Sixth Avenue location Wednesday night, peeping through the windows and snapping pictures with their phones as they dealt with the horror of it being closed.

“I’m dying!” screamed Philip M., 31, of Chelsea. ‘”What am I going to do?! I am really upset … I love the chicken sandwich.”

Rick M., 45, of Manhattan, said: “It’s disheartening … I was going to try it for the first time here today … They are going to have to do something important to gain my confidence back to eat their chicken.”

Terri Collins, a 29-year-old local film student, told The Post she had been dreaming of Chick-fil-A all day before arriving at the 46th Street location and being turned away. She was later spotted at the restaurant near 37th Street, chomping on a couple spicy chicken sandwiches.

“All I ever wanted was Chick-fil-A,” Collins said. “I’m happy and I’m bragging to my friends now I made the trip, a whole few blocks away. If it was something else, I would have changed my mind. I’m satisfied and I can focus now and move on with my life.”