Skip to content

HTMLElement is not defined when using Nuxt SSR #33

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

Open
bradley-varol opened this issue Jul 25, 2022 · 1 comment · May be fixed by #34
Open

HTMLElement is not defined when using Nuxt SSR #33

bradley-varol opened this issue Jul 25, 2022 · 1 comment · May be fixed by #34

Comments

@bradley-varol
Copy link

bradley-varol commented Jul 25, 2022

The latest version is breaking my Nuxt 2 SSR website as HTMLElement (defined as a prop type) is not defined on the server. window is probably the same.

As a quick workaround, I ended up just creating my own component with the code from this library's component, minus the breaking HTMLElement propType.

@ulcuber
Copy link

ulcuber commented Aug 8, 2022

Tried workaround (not working):

<client-only>
  <observer>
  </observer>
</client-only>

See: https://nuxtjs.org/docs/features/nuxt-components/#the-client-only-component

Related: c4f1beb

@ulcuber ulcuber linked a pull request Aug 8, 2022 that will close this issue
@bradley-varol bradley-varol changed the title HTMLEment is not defined when using Nuxt SSR HTMLElement is not defined when using Nuxt SSR Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants