Property 'userStorage' does not exist on type 'SupabaseAuthClientOptions'
When I'm trying to build my application that uses supabase-js I get this error:
Probably the issue comes from the latest version of SDK as previously I was always able to build it.
I'm using "@supabase/supabase-js": "^2.58.0"
12 Replies
The
2.49.8 works as expected.Not finding much. What frame work? Serverside client or browser client?
https://github.com/supabase/supabase-js/issues/936#issuecomment-3316404591
A mention of it supabase-js issues
Also this note about local storage if you are running serverside.
https://supabase.com/docs/reference/javascript/auth-api
And this:
https://github.com/supabase/supabase-js/pull/1545
I'm using the SDK with Angular (browser), the only way I found to resolve the issue is by setting the version to a static
2.49.8.I have nothing to suggest other than generating an issue or you trying to narrow down the change. No one else reporting exactly what you are reporting.
I also don't know anything about Angular. Does it support browser local storage?
I'll open an issue later, seems an SDK issue rather than Angular, I'd give a try even with another framework.
Angular does support the browser local storage.
Try setting persistSession to False in createClient. It may be the new cookie feature checks, and the warning note was added recently also to make persist false for server cases (no local storage).
The issue is that the application do not even build because of the error in the SDK package:

Oh got it, I was overriding the @supabase/auth-js with version 2.61.0 because of a notable issue in Angular and seems that userStorage was implemented later
Was that issue fixed in the latest version? I vaguely remember the issue you had to use 2.61.0 for.
The issue is the one mentioned here:
https://github.com/supabase/supabase-js/issues/936#issuecomment-3316404591
It has not been fixed with the latest release, but if we remove zone.js and make the Angular application zoneless, the issue do not persist anymore.
So we can say that it's "an Angular specific" issue, even if in versions like 2.61.0 it was not persisting.
GitHub
Acquiring an exclusive Navigator LockManager failed · Issue #936 ...
Bug report I confirm this is a bug with Supabase, not with my own application. I confirm I have searched the Docs, GitHub Discussions, and Discord. Describe the bug Angular throws an error saying &...
So to prevent LockManager issue and use the latest supabase-js version, the Angular application must be zoneless.
Else if making the application zoneless is impossible, the solution might be to install supabase-js
2.49.8 and override supabase-auth with 2.61.0
Keeping the override to supabase-auth 2.61.0 with latest SDK 2.58.0 will cause: Property 'userStorage' does not exist on type 'SupabaseAuthClientOptions'Yeah this is the same issue I was thinking about.