Skip to content
Source
Sign inSign up
TanStack/cli

[Bug] Initializing tanstack start project with clerk causes an import error #324

Send to my agent
ClosedJadWS(GitHub profile, opens in a new tab) opened this issue 2 comments

Which project does this relate to?

Create Tanstack App

Describe the bug

Hello I started a new project using the cli command pnpm create @tanstack/start@latest I selected ESLint as a toolchain I selected Nitro as a deployment adapter

And for add-ons i selected:

Clerk

Example: None

Database Provider: PostgreSQL

inside the routes/_root.tsx file there is a a bad import import ClerkProvider from './src/integrations/clerk/provider' This causes typescript to throw the error Cannot find module './src/integrations/clerk/provider' or its corresponding type declarations. ClerkProvider is imported from @clerk/clerk-react While the module being imported should be AppClerkProvider initialized inside src/integrations/clerk/provider This also means the <ClerkProvider> inside routes/_root.tsx inside the html body should be changed as well

Similarly inside src/components/Header.tsx ClerkHeader is imported from './src/integrations/clerk/header-user.tsx' where HeaderUser should have been imported instead from src/integrations/clerk/header-user That issue is also causing a typescript error crashing the site

Your Example Website or App

.

Steps to Reproduce the Bug or Issue

Initialize a project using pnpm create @tanstack/start@latest Select Clerk or Better Auth from thjje add-ons list Run the project

Expected behavior

Run without errors

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Chrome

Additional context

No response

  1. After some invistigation Turns out the problem is with the import: './src/integrations/clerk/header-user.tsx' It should be '../integrations/clerk/header-user.tsx' inside routes/_root.tsx for windows There seem to be no problem for arch linux

  2. Should be fixed in the latest version. Reopen if not!

  3. tannerlinsley closed this

Sign in to join this conversation.