Residents protested against turning the factory into a homeless shelter.