elements icon indicating copy to clipboard operation
elements copied to clipboard

<IntlProvider> leads to crash in production build

Open janoschp opened this issue 1 year ago • 11 comments

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: image 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 like next build and run next start. Open the website with the ory element on it -> client-side crash.

Relevant log output

Failed to load resource: the server responded with a status of 401 (Unauthorized)
8041-ac529177d55d32fd.js:19 TypeError: (intermediate value)(intermediate value)(intermediate value) is not a function
    at memoize (ceb6948a-f5b67890939b9aa6.js:5:62014)
    at createFormatters (ceb6948a-f5b67890939b9aa6.js:16:1330)
    at createIntl$1 (ceb6948a-f5b67890939b9aa6.js:26:119)
    at createIntl (ceb6948a-f5b67890939b9aa6.js:26:4026)
    at new t (ceb6948a-f5b67890939b9aa6.js:26:4634)
    at lC (fd9d1056-92f9772659382b4a.js:1:55121)
    at lW (fd9d1056-92f9772659382b4a.js:1:60010)
    at iZ (fd9d1056-92f9772659382b4a.js:1:118352)
    at ia (fd9d1056-92f9772659382b4a.js:1:95507)
    at fd9d1056-92f9772659382b4a.js:1:95329
    at il (fd9d1056-92f9772659382b4a.js:1:95336)
    at oJ (fd9d1056-92f9772659382b4a.js:1:92692)
    at nb (fd9d1056-92f9772659382b4a.js:1:27178)
    at nw (fd9d1056-92f9772659382b4a.js:1:27916)
    at fd9d1056-92f9772659382b4a.js:1:28950
(anonymous) @ 8041-ac529177d55d32fd.js:19

Relevant configuration

No response

Version

"@ory/client": "^1.15.0",     "@ory/elements": "^0.5.0",

On which operating system are you observing this issue?

Ory Network

In which environment are you deploying?

Ory Network

Additional Context

No response

janoschp avatar Sep 18 '24 05:09 janoschp