TanStackT
TanStack10mo ago
15 replies
hurt-tomato

Monorepo import issues

We're currently creating a POC migrating a feature from Next.js to tanstack start.

We're encountering issues with paths, e.g:
Cannot resolve @repo/database. The TS compiler does not complain, since it's in
package.json
and installed, however, the app seems to fail.

Also, it raises issues from within packages like @repo/ui which holds all the ui components.
As an example, in button.tsx which is in @repo/ui we have an import to import { X } from '@repo/ui/x which is resolved just fine in Next.js, since it has the following path in tsconfig: "@repo/ui/*": ["./*"]. However, in tanstack start there seem to be issues.
Was this page helpful?