You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you install okta-auth-js in a React app with Vite, the production build fails because there is a circular dependency between the esm\browser\myaccount\request.js and all the classes in the transactions subfolder.
Reproduction Steps?
Create a new React app with Vite.
Reference okta-auth-js (7.4.2 or 7.4.3)
Set up Okta authentication in the app so that at least one component references okta-auth-js
The issue can be resolved by exporting the generateRequestFnFromLinks() function from a separate file that will be referenced by the classes in the transactions subfolder.
The text was updated successfully, but these errors were encountered:
Hi @lvid-ascent
This is the same issue that I'm also having for last few days, it seems there is issue with the vite 4.x.x. version. When you compile same dependencies with vite 3.2.7 it works.
Thank you for the report. You will look into this.
While we do, you may be able to work around this issue by explicitly defining what exported bundle Vite consumes.
Our default ESM bundle contains IDX (OIE), AuthN (Classic) and the MyAccount client. Depending on your use case, you may be able to consume a specific bundle (IDX or AuthN) and avoid the circular reference in the MyAccount client
Describe the bug
If you install okta-auth-js in a React app with Vite, the production build fails because there is a circular dependency between the esm\browser\myaccount\request.js and all the classes in the transactions subfolder.
Reproduction Steps?
You receive errors like:
Circular dependency: node_modules/@okta/okta-auth-js/esm/browser/myaccount/request.js -> node_modules/@okta/okta-auth-js/esm/browser/myaccount/transactions/PhoneTransaction.js -> node_modules/@okta/okta-auth-js/
esm/browser/myaccount/request.js
SDK Versions
7.4.2 and 7.4.3
Additional Information?
The issue can be resolved by exporting the generateRequestFnFromLinks() function from a separate file that will be referenced by the classes in the transactions subfolder.
The text was updated successfully, but these errors were encountered: