supabase/supabase-js

Cannot find package "isows"

Closed this issue · 10 comments

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

Hi,

Since the past few days I've got this error on my application :

error: Cannot find package "isows" from "/usr/src/app/.output/server/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js"
2025-06-29 11:57:59.302 EEDT
at new H3Error (/usr/src/app/.output/server/chunks/nitro/nitro.mjs:829:4)
2025-06-29 11:57:59.302 EEDT
at createError$1 (/usr/src/app/.output/server/chunks/nitro/nitro.mjs:855:14)
2025-06-29 11:57:59.302 EEDT
at /usr/src/app/.output/server/chunks/nitro/nitro.mjs:2382:20
2025-06-29 11:57:59.302 EEDT
at processTicksAndRejections (:55:76)
  • It is occuring when deployed on GCP Cloud Run, not in local
  • Supabase is installed in a Nuxt project, with the Supabase module (https://github.com/nuxt-modules/supabase)
  • It happens on the server/api routes of my Nuxt application, and it makes my application broken and unusable

As it is occurring only when deployed, I wonder if has something to do on how Cloud Run works.

System information

  • @supabase/supabase-js : 2.50.2
  • @nuxtjs/supabase : 1.5.3
  • using Bun

Thanks in advance for your help !

Same problem here for @supabase/supabase-js : 2.50.2 with OpenNext on CloudFlare.

16:12:54.867 | Error: Build failed with 1 error:
-- | --
16:12:54.867 | .open-next/server-functions/default/node_modules/.pnpm/@supabase+realtime-js@2.11.15/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js:39:24: ERROR: Could not resolve "isows"
16:12:54.868 | at failureErrorWithLog (/opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:1463:15)
16:12:54.868 | at /opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:924:25
16:12:54.868 | at runOnEndCallbacks (/opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:1303:45)
16:12:54.868 | at buildResponseToResult (/opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:922:7)
16:12:54.869 | at /opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:949:16
16:12:54.869 | at responseCallbacks.<computed> (/opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:601:9)
16:12:54.869 | at handleIncomingPacket (/opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:656:12)
16:12:54.869 | at Socket.readFromStdout (/opt/buildhome/repo/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:579:7)
16:12:54.869 | at Socket.emit (node:events:518:28)

Downgrading to @supabase/supabase-js: 2.49.10 seems to solve this problem.

Indeed !

As I was using Nuxt Supabase, I had to use an overrides in my package.json and also use @nuxtjs/supabase 1.5.0 :

  "overrides": {
    "@supabase/supabase-js": "2.49.10",
  }

Similar, the isows addition breaks tests with jest. It's found, but doesn't work, fixed by adding isows into the transformIgnorePatterns in the jest config, and adding something in for the WebSocket it's trying to check for.

import ws from 'ws'
(global as any).WebSocket ??= ws

The issue is connected to changes in realtime-js lib.
import WebSocket from './WebSocket' changed to import { WebSocket } from 'isows' in v 2.11.13.

Sorry to ping @grdsdev, but is this behavior expected? Or should we consider downgrading realtime-js to resolve it after a month?

Hi @chrox @elyobo and everyone involved in this thread! Thank you for submitting this issue. Please bear with me while I look into it. I will give you an update tomorrow.

In the meantime, if @chrox the solution of downgrade fixes your issue at the moment, use that as a temporary workaround, while I come up with a solid solution.

Thank you for your understanding, and I appreciate your patience here! We'll get this fixed soon!

Reopening until code is in a release

Part of release v2.54.0