lexical-vue icon indicating copy to clipboard operation
lexical-vue copied to clipboard

Is it possible to work with Nuxt3?

Open nsefh opened this issue 1 year ago • 5 comments

Hello, I really liked the framework.

But there was a need to use with Nuxt3. I am not very versed in JS and do not understand the essence of the error.

I copied the example code into the component, but I get an error: [h3] [unhandled] H3Error: Class extends value undefined is not a constructor or null

nsefh avatar Aug 03 '22 13:08 nsefh

h3 error is unrelated to lexical. Do you have a simple reproduction? Try stackblitz

wobsoriano avatar Aug 03 '22 14:08 wobsoriano

h3 error is unrelated to lexical. Do you have a simple reproduction? Try stackblitz

Thanks for the answer. https://stackblitz.com/edit/github-rsrbgs?embed=1&file=components/TextEditor.vue

nsefh avatar Aug 03 '22 16:08 nsefh

Accidentally closed the issue. Unfortunately the question is open.

nsefh avatar Aug 03 '22 16:08 nsefh

Thanks for the repro! I'll check in a bit

wobsoriano avatar Aug 03 '22 18:08 wobsoriano

Still investigating what causes the issue

wobsoriano avatar Aug 14 '22 06:08 wobsoriano

I was getting this error in vue when I had lexical and lexical-vue installed as dev dependencies. Moved them to dependencies and the error is gone. Not sure if that helps with Nuxt.

kylegl avatar Oct 06 '22 08:10 kylegl

Tried it on Nuxt 3.0.0-rc.12 today and got it working. Just wrap your main Editor component in a <ClientOnly /> component.

wobsoriano avatar Oct 21 '22 03:10 wobsoriano