antokara/react-recaptcha-x

Build with CRA

VyacheslavKazadaev opened this issue · 1 comments

Describe the bug
Error while assembling the CRA project with typescrypt. Error: Uncaught (in promise) null.

To Reproduce
Steps to reproduce the behavior:

  1. Let's take an example
<ReCaptchaProvider
      siteKeyV2={process.env.REACT_APP_RECAPTCHA_V2_SITE_KEY}
      siteKeyV3={process.env.REACT_APP_RECAPTCHA_V3_SITE_KEY}
      langCode={'en'}
      hideV3Badge={true}
    >
      <ReCaptchaV3 action="login" callback={v3Callback} />
      {enableV2 ? (
        <ReCaptchaV2
          callback={v2Callback}
          theme={EReCaptchaV2Theme.Light}
          size={EReCaptchaV2Size.Normal}
          id="my-id"
          data-test-id="my-test-id"
          tabindex={0}
        />
      ) : null}
    </ReCaptchaProvider>
  1. npm run build
  2. Refresh page and get error in console!

Sorry! Mismatch of the address specified in the captcha settings.