Skip to content

Conversation

@vkalahas
Copy link
Contributor

@vkalahas vkalahas commented Jan 9, 2026

Caused an error when I tried the drizzle option

Caused an error when I tried the drizzle option
@vkalahas vkalahas changed the title Update import path for db in drizzle.tsx fix: update import path for db in drizzle.tsx Jan 9, 2026
import { createFileRoute, useRouter } from '@tanstack/react-router'
import { createServerFn } from '@tanstack/react-start'
import { db } from '@/db'
import { db } from '@/db/index'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it automatically should pick up the index without this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should, but it doesn't for me for some reason. It gave me errors before I added this as well as the aliasing fix (#278).

Copy link
Contributor Author

@vkalahas vkalahas Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue might be that Neon automatically adds a src/db.ts file as part of the installation. This fix makes it more explicit which db file is used for Drizzle.

To reproduce, try choosing the Drizzle and Neon options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a Neon option. Maybe im just not seeing it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you are right

@brenelz brenelz merged commit 2293742 into TanStack:main Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants