React Okta authentication - okta-auth-js showing error - Super expression must either be null or a function

I am using Okta authentication for my react application, authentication works well on localhost environment. However, when I hosted app on the Azure platform, it is showing error of - ‘Super expression must either be null or a function’ in the octa-auth-js. I have used react - okta-signin-widget.

okta-versions -
@okta/okta-auth-js: “^6.0.0”
@okta/okta-react: “^6.4.2”

Please can anyone help with error, not able to provide build due this error.


Are you using the latest version of React? Found a stackoverflow thread that mentions the same error: