nuxt-modules / og-image

Generate OG Images with Vue templates in Nuxt.
https://nuxtseo.com/og-image
415 stars 27 forks source link

[500] Intl.Segmenter does not exist. Please use import a polyfill #29

Closed tmlmt closed 1 year ago

tmlmt commented 1 year ago

Describe the bug

Visualisation of og.png leads to the referenced error.

Reproduction

https://stackblitz.com/edit/nuxt-starter-gdt6pi?file=pages/index.vue Click on any "OG:IMAGE" link.

System / Nuxt Info

------------------------------
- Operating System: `Linux`
- Node Version:     `v16.14.2`
- Nuxt Version:     `3.3.1`
- Nitro Version:    `2.3.2`
- Package Manager:  `npm@7.17.0`
- Builder:          `vite`
- User Config:      `runtimeConfig`, `modules`
- Runtime Modules:  `nuxt-og-image@1.5.5`
- Build Modules:    `-`
------------------------------
harlan-zw commented 1 year ago

Can't seem to replicate it with the latest beta

https://stackblitz.com/edit/nuxt-starter-xccx6d?file=package.json

Could you verify?

tmlmt commented 1 year ago

It does not work on my end ://

image

harlan-zw commented 1 year ago

It does not work on my end ://

image

What browser are you using?

tmlmt commented 1 year ago

Good point !

harlan-zw commented 1 year ago

Looks like this can be solved with https://github.com/surferseo/intl-segmenter-polyfill

I tried testing this on Firefox outside of Stackblitz and it appears to work so I'm not sure if it makes sense to polyfill. Maybe you could also confirm you can't replicate outside of Stackblitz.

tmlmt commented 1 year ago

I copied the above-referenced stackblitz repro locally on my machine, and can confirm that it works fine with Firefox, so I also propose to close this one, and for future issues I'll avoid using Firefox for nuxt-og-image repros on Stackblitz.