Okta-auth-js version 5.x => Passed in oktaAuth is not compatible with the SDK

I have a react application with the following:
@okta/okta-auth-js”: “^5.2.3”,
@okta/okta-react”: “^6.0.0”,

based on documentation on okta/react repo. okta-react 6.x should be compatible with 5.x.
however I am getting this error:
AuthSdkError: Passed in oktaAuth is not compatible with the SDK, okta-auth-js version 5.x is the current supported version.
weird thing is, this error goes away after I refresh the page, it only shows up when I navigate to the page from another page. if I refresh on the page it goes away.

Are you pulling in okta-auth-js separately, or just installing it as a dependency for the React SDK (Auth JS is a peer dependency)? If you clear node_modules and only install the React SDK, do you still see this error?