Closed s-hamdananwar closed 8 months ago
Hey @s-hamdananwar there seemed to be a packaging issue in the server
build. It should be updated in version 0.1.120.
We have had reports of issues when running in a treeshaken environment such as Next.js serverless functions when deployed but it should work fine locally. We are working with the Tailwind team to see how we can get away with not having a file system.
Hey, i know this issue is closed but i do encounter the same problem with version 0.1.127 in a NextJS App when running locally in dev mode. I don't know if it's even supposed to work in a code sandbox, but I was able to reproduce this there as well. https://codesandbox.io/p/devbox/next-js-fxis37
Hey @kjell0w, the current 0.1.127 version does have a server export. I can't seem to find the reproduction in the sandbox, it links to a basic next app without the dependencies :/
@Titou325 Thanks for your quick response. Sorry my bad, someshow shared a wrong URL. The compile function is imported in app/api/print/route.ts . https://codesandbox.io/p/devbox/modest-morning-cmy95m
Hey @kjell0w, indeed I was able to reproduce the error. As of now, the /server import is equal to client as we have fixed Tailwind support.
I have fixed your sandbox at https://codesandbox.io/p/devbox/cranky-moon-fy7mhx
@Titou325 Yes that works, thanks alot!
Trying to import Tailwind component according to this documentation results in error:
Cannot find module '@onedoc/react-print/server' or its corresponding type declarations.
I am trying to use it in Next.js server side components.