Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: import_util.TextEncoder is not a constructor if use @ory/client for SSR project #375

Open
3 of 5 tasks
tamtakoe opened this issue Sep 5, 2024 · 0 comments
Open
3 of 5 tasks
Labels
bug Something is not working.

Comments

@tamtakoe
Copy link

tamtakoe commented Sep 5, 2024

Preflight checklist

Ory Network Project

No response

Describe the bug

@ory/client doesn't work for SSR rendering

Reproducing the bug

I'm using @ory/client for Angular 18 project

import { Configuration, OAuth2Api, IdentityApi, FrontendApi, LoginFlow, RegistrationFlow, LogoutFlow, RecoveryFlow, SettingsFlow, VerificationFlow, GenericError, UiContainer, UiNodeAttributes, UiNodeInputAttributes, UiNodeTextAttributes, UiNodeImageAttributes } from "@ory/client"
...

And see the runtime error

Relevant log output

2:43:58 PM [vite] Error when evaluating SSR module /@fs/Users/myname/dev/myproject/.angular/cache/18.2.2/vite/deps_ssr/@ory_client.js?v=58d55296:
|- TypeError: import_util.TextEncoder is not a constructor
    at eval (/Users/myname/dev/myproject/.angular/cache/18.2.2/vite/deps_ssr/@ory_client.js:12400:19)
    at async instantiateModule (file:///Users/myname/dev/myproject/node_modules/vite/dist/node/chunks/dep-NjL7WTE1.js:52844:5)

Relevant configuration

No response

Version

1.14.5

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Docker Compose

Additional Context

No response

@tamtakoe tamtakoe added the bug Something is not working. label Sep 5, 2024
@ory ory deleted a comment Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant