Skip to content

Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' #554

@nice89

Description

@nice89

Version

@nuxtjs/supabase: v2.x (latest 2.x release at time of writing)
nuxt: v4.x
node: v24.x
os: Windows 11

Reproduction Link

No public repository is available.

However, the issue can be reproduced by following the official documentation example for serverSupabaseServiceRole:

https://supabase.nuxtjs.org/services/serversupabaseservicerole

Steps to reproduce

  1. Create a fresh Nuxt 4 project:

    • npx nuxi init my-app
    • cd my-app
  2. Install and configure @nuxtjs/supabase v2.x according to the official setup guide:

    • Add @nuxtjs/supabase to modules in nuxt.config
    • Configure the Supabase URL and anon/service role keys as described in the docs.
  3. Implement the example from the documentation page
    https://supabase.nuxtjs.org/services/serversupabaseservicerole
    Specifically:

    • Create a server route (e.g. server/api/test-service-role.get.ts)
    • Inside that handler, call serverSupabaseServiceRole() and perform a simple query (for example, select from a test table) exactly as shown in the docs.
  4. Run the development server:

    • npm run dev
  5. Call the server endpoint you created (e.g. GET /api/test-service-role) from a browser or via a tool like curl/Postman.

  6. Observe the behavior of:

    • Server-side functions using serverSupabaseServiceRole
    • Client-side Supabase functions (for comparison, you can also implement the basic client-side example from the docs).

What is Expected?

  • The serverSupabaseServiceRole() helper should return a working Supabase client in Nuxt 4 when using @nuxtjs/supabase v2.x.
  • The server endpoint using serverSupabaseServiceRole should:
    • Execute queries successfully using the service role key.
    • Respond with the queried data (e.g. rows from a table) without errors.
  • Client-side and server-side Supabase helpers should both function correctly under the same configuration.

What is actually happening?

  • Client-side Supabase functions work as expected (no issues observed when using the standard client helpers in pages/components).
  • When using server-side helpers (particularly serverSupabaseServiceRole) in a server route:
    • The endpoint fails at runtime.
    • The request returns an error response (HTTP 500 / internal server error).
    • The failure appears to originate from the server-side Supabase helper provided by the module, not from the user-land query logic itself.
  • This problem occurs only when using @nuxtjs/supabase v2.x with Nuxt 4 and Node 24 on Windows 11.
  • The documentation example at https://supabase.nuxtjs.org/services/serversupabaseservicerole cannot be run successfully in this environment using v2.x, while client-side functions from the same module and configuration remain functional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions