External package build configuration to works with nextjs

Hello, I’m managing two repositories with TurboRepo: one dedicated to libraries and the other containing several apps alongside some common packages. However, I’m encountering multiple errors when attempting to use a library from the libraries repository. I’ve been building and publishing the library, then using it from the registry. Despite trying various build configurations with tsc and tsup, I keep running into issues with packages that are either unavailable on the client side or missing on the server side.

Is there any documentation or a standard configuration for handling third-party libraries? Also, is there a way to configure everything with a ‘use client’ directive to circumvent server-side incompatibilities?

Thanks!

Hi, @franfernandez20!

Thanks for your patience! I was curious if you made any progress with this?

Could you share the error logs with us so that we can dig deeper on the issue?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.