In the reCAPTCHA Admin Console, when adding domains, make sure to include "localhost" as one of the domains.
Configure reCAPTCHA for localhost: