Galaxy protoclusters, which will eventually grow into the massive clusters we see in the local Universe, are usually traced by locating overdensities of galaxies1. Large spectroscopic surveys of distant galaxies now exist, but their sensitivity depends mainly on a galaxy’s star-formation activity and dust content rather than its mass. Tracers of massive protoclusters that do not rely on their galaxy constituents are therefore needed. Here we report observations of Lyman-α absorption in the spectra of a dense grid of background galaxies2,3, which we use to locate a substantial number of candidate protoclusters at redshifts 2.2 to 2.8 through their intergalactic gas. We find that the structures producing the most absorption, most of which were previously unknown, contain surprisingly few galaxies compared with the dark-matter content of their analogues in cosmological simulations4,5. Nearly all of the structures are expected to be protoclusters, and we infer that half of their expected galaxy members are missing from our survey because they are unusually dim at rest-frame ultraviolet wavelengths. We attribute this to an unexpectedly strong and early influence of the protocluster environment6,7 on the evolution of these galaxies that reduced their star formation or increased their dust content.