Ju99ernaut / grapesjs-tailwind

Tailwind integration for grapesjs
MIT License
116 stars 61 forks source link

Unhandled Runtime Error TypeError: Cannot read properties of null (reading 'readyState') #2

Closed bovealexandre closed 2 years ago

bovealexandre commented 2 years ago

Hi I'm using next.JS and I have this error whenever I use your other plugin (project manager) I had an error with project manager that I finally fixed but Tailwind is not working now

Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'readyState')

Call Stack
eval
node_modules\grapesjs-tailwind\dist\grapesjs-tailwind.min.js (2:324087)
Ju99ernaut commented 2 years ago

I'm not too sure but it's likely the canvas isn't loading properly

bovealexandre commented 2 years ago

whenever I remove the project manager it works well so I'm doing my own page manager and now it works but whenever I change page with the select function it removes tailwind so I'm trying to find a solution to take the whole head store it in a variable and put it in the new render

bovealexandre commented 2 years ago

ok now I've tried everything to make this plugin work with every way possible to make a Page Manager and i can't make it rerender once I change page

bovealexandre commented 2 years ago

@Ju99ernaut please can you help me to keep tailwind after changing page

Ju99ernaut commented 2 years ago

I'll look into it, can you provide more details of your setup and how to reproduce this issue

artf commented 2 years ago

Hi @Ju99ernaut in order to support multiple pages/frames with external resources in your plugin I'd suggest you subscribing to the frame's loaded event (similar to SwitchVisibility command)

bovealexandre commented 2 years ago

here is my code if you want to watch @Ju99ernaut it's still a wip

thank you @artf it is working

Ju99ernaut commented 2 years ago

Thanks @artf, will update the plugin