T
TanStack4mo ago
typical-coral

Vite PreTransform Error

I am running to the following error on latest when loading page:
[vite] (client) Pre-transform error: `super()` is only valid inside a class constructor of a subclass.
[vite] (client) Pre-transform error: `super()` is only valid inside a class constructor of a subclass.
Is therer a known solution for this?
7 Replies
typical-coral
typical-coralOP4mo ago
A little more context:
7:50:19 AM [vite] Internal server error: `super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (831:8)
Plugin: vite-plugin-tanstack-start-create-server-fn
7:50:19 AM [vite] Internal server error: `super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (831:8)
Plugin: vite-plugin-tanstack-start-create-server-fn
typical-coral
typical-coralOP4mo ago
my vite config
No description
typical-coral
typical-coralOP4mo ago
I suspect I have some bad setup coming from older Vinxi setup. So fixing that is likely my path forward. I’ll look into that shortly
yelping-magenta
yelping-magenta4mo ago
I just ran into this as well.
other-emerald
other-emerald4mo ago
can you please provide a complete example that reproduces this?
typical-coral
typical-coralOP4mo ago
Seems my problem was that I needed to upgrade to vite 7
wee-brown
wee-brown3mo ago
Incase it helps anyone else I ran into this issue when upgrading better-auth which depends on @tanstack/react-start (dev dependency) To resolve the issue I updated vite to v7 and also updated my version of @tanstack/react-start and @tanstack/react-router

Did you find this page helpful?