You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, apperently drizzle uses perf_hooks(and many other node libs) internally which vite is unable to polyfill outside of server.
I managed to polyfill them, but each time a new error was appearing and a new lib required polyfill etc which made me realize polyfilling is not the way to go.
Afaik drizzle is supposed to only run on the server and therefore inside formAction it is supposed to be on the server. After some testing I made I found out that removing drizzle from formAction solved the issue and build was successful. It works perfectly on routeAction$, globalAction$ and routeLoader$. Iirc, formAction builds on top on globalAction and therefore this was supposed to not be a problem.
I must be missing something.
I will attach a sanbox or repo link below
The text was updated successfully, but these errors were encountered:
This is a known problem, see QwikDev/qwik#5160. I will try to fix it in the next 3 months. A workaround could be to wrap you code into if (isServer) inside of formAction$.
For the last 24 hours I have been unable to build my project. It was giving me this error
So, apperently drizzle uses
perf_hooks
(and many other node libs) internally which vite is unable to polyfill outside of server.I managed to polyfill them, but each time a new error was appearing and a new lib required polyfill etc which made me realize polyfilling is not the way to go.
Afaik drizzle is supposed to only run on the server and therefore inside
formAction
it is supposed to be on the server. After some testing I made I found out that removing drizzle from formAction solved the issue and build was successful. It works perfectly onrouteAction$
,globalAction$
androuteLoader$
. Iirc,formAction
builds on top onglobalAction
and therefore this was supposed to not be a problem.I must be missing something.
I will attach a sanbox or repo link below
The text was updated successfully, but these errors were encountered: