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
Hi, I was following the example in the documentation and this happened to me. I am currently using it in a newly created Vite project, it only has Tailwind. I'm using latest version of Chrome and Windows 10 Pro, here are the packages I am using:
When I try to log the HTML, it gives me that error: ReactDOMServer.renderToString is not a function. This comes from the compile function. I've tried changing the import to import { compile } from "@fileforge/react-print/client"; But that just results in the error 'Cannot find module '@fileforge/react-print/client' or its corresponding type declarations.ts(2307)', even though my VS Code recognize and autocompletes it. Now, I've tried in Next.JS 14, and it seems to work just fine in that type of enviorment.
The text was updated successfully, but these errors were encountered:
Hey @rivasdiego-dev, thanks for reporting this. We actually walked into a similar issue with our sandbox earlier today, where Vite treeshaking removes the React DOM dependency. Usually, adding await import("react-dom/server") somewhere in the render code keeps the package in the final tree. You should be able to check the code on the onboarding Stackblitz. Let me know if this helps!
Hi, I was following the example in the documentation and this happened to me. I am currently using it in a newly created Vite project, it only has Tailwind. I'm using latest version of Chrome and Windows 10 Pro, here are the packages I am using:
When I try to log the HTML, it gives me that error: ReactDOMServer.renderToString is not a function. This comes from the compile function. I've tried changing the import to
import { compile } from "@fileforge/react-print/client";
But that just results in the error 'Cannot find module '@fileforge/react-print/client' or its corresponding type declarations.ts(2307)', even though my VS Code recognize and autocompletes it. Now, I've tried in Next.JS 14, and it seems to work just fine in that type of enviorment.The text was updated successfully, but these errors were encountered: