Open janoschp opened 6 days ago
I can't reproduce this issue. Could you provide a minimal reproduction, e.g. some code, that you used to trigger this?
@jonas-jonas I was able to reproduce the bug within a default next.js project. Here is a proof of concept: https://github.com/janoschp/ory-elements-bug-proof-of-concept . Run next build
& next start
and open http://localhost:3000 to see it. This bug does not occur when running next dev
.
You can also try replacing the <IntlProvider>
provided by "@ory/elements"
by using the library "react-intl": "^6.6.8"
and importing their <IntlProvider>
, which will make the bug disappear. Which means the bug must be triggered by the diff between your IntlProvider (which I assume builds on the one from react-intl) and theirs.
Preflight checklist
Ory Network Project
jolly-antonelli-gs7stzrg5w
Describe the bug
Using your
<IntlProvider>
component works well in a dev build but not in an optimized production build. The error I keep getting is this:When I use the
<IntlProvider>
from 'react-intl' then there is no problem, but I no longer have the option to override ory error messages, which I now have to do.Reproducing the bug
Setup a nextjs project, use any ory element that is wrapped in a
<IntlProvider>
from '@ory/elements' component. Create a production build likenext build
and runnext start
. Open the website with the ory element on it -> client-side crash.Relevant log output
Relevant configuration
No response
Version
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response