[GH-ISSUE #4428] SolidStart + BetterAuth 1.3.8 #18560

Closed
opened 2026-04-15 17:03:37 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @pruginkin on GitHub (Sep 4, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/4428

Originally assigned to: @himself65 on GitHub.

Bug description

After updating BetterAuth from 1.3.7 to 1.3.8, the build/runtime throws an error:

[vite] Internal server error: node_modules/.vinxi/client/deps/better-auth_client_plugins.js
super() is only valid inside a class constructor of a subclass.
Maybe a typo in the method name ('constructor') or not extending another class? (11633:8)

11631 | get ["constructor"](https://github.com/better-auth/better-auth/issues/4428)

The error shows that super() is being called outside of a valid class constructor.
This issue does not exist on version 1.3.7.


Steps to reproduce

  1. Install BetterAuth 1.3.8
  2. Build or run the project with Vite (using vinxi)
  3. Observe the error in the client build output

Expected behavior

The client should build and run without errors, as it did in version 1.3.7.


Version

  • BetterAuth: 1.3.8
  • OS: Linux
  • Bundler: vite (via vinxi)

Affected area(s)

  • Client

Originally created by @pruginkin on GitHub (Sep 4, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/4428 Originally assigned to: @himself65 on GitHub. ### Bug description After updating **BetterAuth** from `1.3.7` to `1.3.8`, the build/runtime throws an error: ``` [vite] Internal server error: node_modules/.vinxi/client/deps/better-auth_client_plugins.js super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (11633:8) 11631 | get ["constructor"](https://github.com/better-auth/better-auth/issues/4428) ``` The error shows that `super()` is being called outside of a valid class constructor. This issue does not exist on version `1.3.7`. --- ### Steps to reproduce 1. Install BetterAuth `1.3.8` 2. Build or run the project with Vite (using `vinxi`) 3. Observe the error in the client build output --- ### Expected behavior The client should build and run without errors, as it did in version `1.3.7`. --- ### Version - BetterAuth: `1.3.8` - OS: `Linux` - Bundler: `vite` (via `vinxi`) --- ### Affected area(s) - [x] Client ---
GiteaMirror added the locked label 2026-04-15 17:03:37 -05:00
Author
Owner

@utopyin commented on GitHub (Sep 4, 2025):

Got the same error using TanStack Start on React. Downgrading to 1.3.7 fixed it

<!-- gh-comment-id:3253755437 --> @utopyin commented on GitHub (Sep 4, 2025): Got the same error using TanStack Start on React. Downgrading to 1.3.7 fixed it
Author
Owner

@Stadly commented on GitHub (Sep 4, 2025):

Same error with SvelteKit.

<!-- gh-comment-id:3253998163 --> @Stadly commented on GitHub (Sep 4, 2025): Same error with SvelteKit.
Author
Owner

@himself65 commented on GitHub (Sep 4, 2025):

I will check

<!-- gh-comment-id:3255315499 --> @himself65 commented on GitHub (Sep 4, 2025): I will check
Author
Owner

@himself65 commented on GitHub (Sep 4, 2025):

It seems like Bundler will transform the code into the wrong syntax. Checking

<!-- gh-comment-id:3255342315 --> @himself65 commented on GitHub (Sep 4, 2025): It seems like Bundler will transform the code into the wrong syntax. Checking
Author
Owner

@himself65 commented on GitHub (Sep 4, 2025):

Can you provide the code so I can reproduce, even I know what's the error comes from but not sure what's the best way to fix it

<!-- gh-comment-id:3255399855 --> @himself65 commented on GitHub (Sep 4, 2025): Can you provide the code so I can reproduce, even I know what's the error comes from but not sure what's the best way to fix it
Author
Owner

@himself65 commented on GitHub (Sep 4, 2025):

1:12:49 PM [vite] (client) Pre-transform error: /Users/himself65/Code/better-auth-ecosystem-ci/modules/solidstart-better-auth-test/node_modules/.vinxi/client/deps/better-auth_client_plugins.js: `super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (11633:8)

  11631 |     get ["constructor"]() {
  11632 |       var __super = (...args) => {
> 11633 |         super(...args);
        |         ^
  11634 |         __privateAdd(this, _hiddenStack);
  11635 |         return this;
  11636 |       };
  Plugin: solid
  File: /Users/himself65/Code/better-auth-ecosystem-ci/modules/solidstart-better-auth-test/node_modules/.vinxi/client/deps/better-auth_client_plugins.js?v=447953f8:11633:8                                                                                                                               
  11631|      get ["constructor"]() {
  11632|        var __super = (...args) => {                                                                                                         
  11633|          super(...args);                                                                                                                    
     |          ^                                                                                                                                    
  11634|          __privateAdd(this, _hiddenStack);                                                                                                  
  11635|          return this; (x2)                                                                                                                  
The file does not exist at "/Users/himself65/Code/better-auth-ecosystem-ci/modules/solidstart-better-auth-test/node_modules/.vinxi/client/deps/chunk-BUSYA2B4.js?v=2e5c3ad7" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. 
<!-- gh-comment-id:3255447264 --> @himself65 commented on GitHub (Sep 4, 2025): ```shell 1:12:49 PM [vite] (client) Pre-transform error: /Users/himself65/Code/better-auth-ecosystem-ci/modules/solidstart-better-auth-test/node_modules/.vinxi/client/deps/better-auth_client_plugins.js: `super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (11633:8) 11631 | get ["constructor"]() { 11632 | var __super = (...args) => { > 11633 | super(...args); | ^ 11634 | __privateAdd(this, _hiddenStack); 11635 | return this; 11636 | }; Plugin: solid File: /Users/himself65/Code/better-auth-ecosystem-ci/modules/solidstart-better-auth-test/node_modules/.vinxi/client/deps/better-auth_client_plugins.js?v=447953f8:11633:8 11631| get ["constructor"]() { 11632| var __super = (...args) => { 11633| super(...args); | ^ 11634| __privateAdd(this, _hiddenStack); 11635| return this; (x2) The file does not exist at "/Users/himself65/Code/better-auth-ecosystem-ci/modules/solidstart-better-auth-test/node_modules/.vinxi/client/deps/chunk-BUSYA2B4.js?v=2e5c3ad7" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#18560