[Bug] Initializing tanstack start project with clerk causes an import error #324
Send to my agentWhich 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
Should be fixed in the latest version. Reopen if not!
tannerlinsley closed this
Sign in to join this conversation.
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'insideroutes/_root.tsxfor windows There seem to be no problem for arch linux