supabase-js: (Supabase.js not working with expo sdk 53 ? ) The package at "node_modules\ws\lib\stream.js" attempted to import the Node standard library module "stream".

Supabase not working with expo sdk 53 ?

I updated from latest expo sdk 52.0.46 to new expo sdk 53.0.1 , i am also using node 23.11.0 , and i am using eas build . System windows 11.0.0

Everything worked perfectly on expo sdk 52.0.46 with custom dev client and now getting this error

============ error ==========

Image

Android Bundling failed 23470ms index.js (2841 modules) The package at “node_modules\ws\lib\stream.js” attempted to import the Node standard library module “stream”. It failed because the native React runtime does not include the Node standard library. Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries

below is my package json with the scripts :

{
  "private": true,
  "name":NoMoneyNoHoney",
  "version": "1.0.0",
  "scripts": {
    "eas-android-development-client-apk": "eas build -p android --profile development",
    "eas-android-development-client-apk-local": "eas build --profile development --platform android --local",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "publish": "expo publish",
    "expo-doctor": "npx expo-doctor@latest",
    "-": "-",
    "deploy": "eas build --platform android",
    "check-updates": "npx npm-check-updates",
    "upgrade-dependencies": "npx expo install --fix",
    "--": "--",
    "eas-android-production-apk": "eas build -p android --profile production-apk",
    "eas-android-local-prod-apk": "eas build --profile production-apk --platform android --local",
    "---": "---",
    "npx_prebuild": "npx expo prebuild --clean",
    "start": "npx expo start --dev-client",
    "clearCache": "npx expo start -c"
  },
  "dependencies": {
    "@expo/metro-config": "~0.20.0",
    "@expo/metro-runtime": "~5.0.4",
    "@expo/prebuild-config": "~9.0.0",
    "@expo/vector-icons": "^14.1.0",
    "@notifee/react-native": "9.1.8",
    "@react-native-async-storage/async-storage": "2.1.2",
    "@react-native-community/netinfo": "11.4.1",
    "@sentry/react-native": "~6.10.0",
    "@shopify/react-native-skia": "v2.0.0-next.2",
    "@supabase/supabase-js": "2.49.4",
    "@types/react": "~19.0.10",
    "axios": "1.9.0",
    "expo": "~53.0.1",
    "expo-application": "~6.1.3",
    "expo-asset": "~11.1.3",
    "expo-auth-session": "~6.1.4",
    "expo-av": "~15.1.3",
    "expo-build-properties": "~0.14.5",
    "expo-clipboard": "~7.1.3",
    "expo-constants": "~17.1.3",
    "expo-crypto": "~14.1.3",
    "expo-dev-client": "~5.1.5",
    "expo-device": "~7.1.3",
    "expo-document-picker": "~13.1.4",
    "expo-file-system": "~18.1.7",
    "expo-image-picker": "~16.1.3",
    "expo-linear-gradient": "~14.1.3",
    "expo-linking": "~7.1.3",
    "expo-sharing": "~13.1.4",
    "expo-splash-screen": "~0.30.6",
    "expo-system-ui": "~5.0.5",
    "expo-web-browser": "~14.1.5",
    "firebase": "11.6.1",
    "lottie-react-native": "7.2.2",
    "qs": "6.14.0",
    "react": "19.0.0",
    "react-dom": "19.0.0",
    "react-native": "0.79.1",
    "react-native-animatable": "1.4.0",
    "react-native-crypto-js": "^1.0.0",
    "react-native-gesture-handler": "~2.24.0",
    "react-native-google-mobile-ads": "14.11.0",
    "react-native-reanimated": "~3.17.4",
    "react-native-redash": "^18.1.3",
    "react-native-safe-area-context": "5.3.0",
    "react-native-screens": "~4.10.0",
    "react-native-svg": "15.11.2",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-view-shot": "~4.0.3",
    "react-native-web": "^0.20.0",
    "react-native-webview": "13.13.5",
    "typescript": "~5.8.3",
    "zustand": "^5.0.3"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "babel-plugin-module-resolver": "^5.0.2",
    "prettier": "^3.5.3"
  },
  "expo": {
    "doctor": {
      "reactNativeDirectoryCheck": {
        "listUnknownPackages": false
      }
    }
  }
}

So i have builded succesfully a dev-client-apk and i pressed start project and i am getting this weird error and i searched everywhere and i don’t know if it’s supabase or expo having this issue right now :

It happens just when the app is building and ready to start … ============ error ==========

Android Bundling failed 23470ms index.js (2841 modules) The package at “node_modules\ws\lib\stream.js” attempted to import the Node standard library module “stream”. It failed because the native React runtime does not include the Node standard library. Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries

============================

I did the below to check who is the guilty and maybe it’s supabase ?

 npm ls ws

+-- @supabase/supabase-js@2.49.4
| `-- @supabase/realtime-js@2.11.2
|   `-- ws@8.18.1
+-- expo@53.0.1
| `-- @expo/cli@0.24.7
|   +-- @react-native/dev-middleware@0.79.1
|   | `-- ws@6.2.3
|   `-- ws@8.18.1 deduped
`-- react-native@0.79.1
  +-- @react-native/community-cli-plugin@0.79.1
  | `-- metro@0.82.2
  |   `-- ws@7.5.10
  +-- react-devtools-core@6.1.1
  | `-- ws@7.5.10
  `-- ws@6.2.3

I searched for a workaround and tried with polyfill but nothing works … :

Image

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 66
  • Comments: 146 (22 by maintainers)

Most upvoted comments

hi there! this is the same issue as https://github.com/supabase/realtime-js/issues/415

the teams at expo and supabase have been discussing this and a fix is in progress. you can disable the package exports configuration in metro as described here:

// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config;

Hey everyone, we’re working on a fix for this, thanks for your patience!

when are you planning to fix this? should I change Supabase to Firebase as I’m starting a new project?

To add to @filipecabaco, the fix for this issue is released in @supabase/supabase-js@2.49.5-next.1! You can install this exact version and see if this resolves the issue for you.

✅ It worked for me with your fix - Issue Resolved with Next Version of Supabase JS

If you’re experiencing issues related to stream or unsupported Node modules in Expo (e.g., with supabase-js in React Native or Expo projects), this has been addressed in the next release: @supabase/supabase-js@2.49.5-next.1 @supabase/realtime-js@2.11.8-next.1

📦 Install the fixed version directly: npm install @supabase/supabase-js@2.49.5-next.1 Tested and confirmed working with Expo SDK 53 and React Native 0.79+.

Thanks to the Supabase team for the quick patch! 🚀

i cant believe how much time i wasted trying to fix this only to find out its a supabase issue. I’m moving my app to firebase

New version now available, please do provide feedback so we can close this issue if fixed.

Version is 2.49.6

Thank you for the patience and for helping us.

@noberas - i hate to break it to you…

the firebase js package is also not working properly with react native 0.79 yet. you can change the metro bundler configuration to work around the issue for now: https://github.com/expo/expo/discussions/36551

To add to @filipecabaco, the fix for this issue is released in @supabase/supabase-js@2.49.5-next.1! You can install this exact version and see if this resolves the issue for you.

Hey everyone, we’re working on a fix for this, thanks for your patience!

I’m glad to hear there’s progress. It’s been two days now that I’ve been waiting for the bug to be resolved. The project I’m working on is already well advanced and heavily relies on Supabase, which is deeply integrated into the architecture. While migrating to another service is technically possible, it would require a significant time investment—something that’s unfortunately not feasible given the tight delivery deadlines.

Not sure how much this will help, but I had Claude 4 craft a comment for you all based on our troubleshooting and discovered workaround for this issue. I don’t have the time myself to dig into the specifics, but hope that it might provide some insight for others looking into or dealing with this issue 😃


✅ Comprehensive Workaround for Expo SDK 53 + Supabase Compatibility

I wanted to share a complete solution that successfully resolves both the bundling issues and subsequent runtime authentication problems. This workaround was discovered and implemented with assistance from an AI agent (Claude 4 Sonnet) while debugging a production mobile app.

Metro Configuration Solution

The key is using Metro’s resolveRequest method to intercept problematic Node.js module imports:

// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');

const config = getDefaultConfig(__dirname);

// Expo SDK 53 specific resolver configuration for Node.js modules
config.resolver.resolveRequest = (context, moduleName, platform) => {
  // Disable problematic Node.js modules for React Native
  if (
    moduleName === 'ws' ||
    moduleName === 'stream' ||
    moduleName === 'crypto' ||
    moduleName === 'buffer' ||
    moduleName === 'util' ||
    moduleName === 'events' ||
    moduleName === 'fs' ||
    moduleName === 'path' ||
    moduleName === 'os' ||
    moduleName.startsWith('node:')
  ) {
    return {
      type: 'empty',
    };
  }
  
  // Default resolver
  return context.resolveRequest(context, moduleName, platform);
};

module.exports = config;

Simplified Polyfills

Importantly, we found that removing conflicting polyfills was crucial. Many polyfills were actually making the problem worse:

// polyfills.js - MINIMAL approach
import 'react-native-get-random-values';
import 'react-native-url-polyfill/auto';
import 'text-encoder';
import { polyfill as polyfillEncoding } from "react-native-polyfill-globals/src/encoding";

// Apply minimal polyfills to avoid interference with native fetch
polyfillEncoding();

❌ Avoid these polyfills that can cause the “blobId” runtime errors:

  • react-native-polyfill-globals/src/fetch
  • react-native-polyfill-globals/src/crypto
  • Various crypto-related packages

Supabase Client Configuration

Use a minimal Supabase client configuration:

// client.ts
import { createClient } from '@supabase/supabase-js';
import AsyncStorage from '@react-native-async-storage/async-storage';

export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
  auth: {
    storage: AsyncStorage,
    autoRefreshToken: true,
    persistSession: true,
    detectSessionInUrl: false,
  },
  // No custom fetch overrides - let it use native fetch
});

Session Management for “missing sub claim” Errors

Handle corrupted sessions gracefully:

// App initialization
useEffect(() => {
  const getUser = async () => {
    try {
      const { data: { user }, error } = await supabase.auth.getUser();
      if (error) {
        if (error.message.includes('Auth session missing') ||
            error.message.includes('missing sub claim') ||
            error.message.includes('invalid claim')) {
          // Clear corrupted sessions silently
          await supabase.auth.signOut();
          setUser(null);
        } else {
          console.error('Error getting user:', error);
          setUser(null);
        }
      } else {
        setUser(user);
      }
    } catch (error) {
      if (error instanceof Error && 
          (error.message.includes('missing sub claim') || 
           error.message.includes('invalid claim'))) {
        await supabase.auth.signOut();
      }
      setUser(null);
    }
  };

  getUser();
}, []);

Results

✅ Bundle builds successfully (no more “node_modules/ws/lib/stream.js” errors)
✅ Authentication works properly (no “blobId” errors)
✅ Session management is stable (no “missing sub claim” spam)
✅ App runs reliably on iOS simulator and physical devices

Key Insights

  1. resolveRequest > alias mapping: The resolveRequest approach is more reliable than Metro alias configurations
  2. Less is more with polyfills: Minimal polyfills prevent conflicts with native implementations
  3. Session corruption is real: Expo SDK 53 changes how sessions are stored/retrieved, requiring better error handling

Tested Environment

  • Expo SDK: 53.0.9
  • React Native: 0.79.2
  • Supabase JS: 2.39.8 (we tested both 2.39.8 and 2.49.4)
  • Node: 22.15.1
  • Platform: iOS (simulator and device)

This solution addresses both the immediate bundling problem and the downstream runtime authentication issues that many developers encounter after “fixing” just the Metro configuration.

Hope this helps others experiencing this compatibility issue! 🚀

This workaround worked for me

-add a new file at project root metro.config.js and put this in it:

const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);

// ⬇️ temporary workaround for the “stream” / Node core‑module error
config.resolver.unstable_enablePackageExports = false;

module.exports = config;

-delete node_modules, -uninstall expo cli using npm uninstall -g expo-cli

run command npm install to reinstall

run command npx expo start --clear to start it back up

This fix worked for me I hope it works for somebody else.

hi there! this is the same issue as supabase/realtime-js#415

the teams at expo and supabase have been discussing this and a fix is in progress. you can disable the package exports configuration in metro as described here:

// metro.config.js const { getDefaultConfig } = require(‘expo/metro-config’);

/** @type {import(‘expo/metro-config’).MetroConfig} */ const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config; Thanks!

Adding the false flag to my config works for now:

config.resolver.unstable_enablePackageExports = false;

Hi all, we just released a fix for this in the latest https://github.com/supabase/supabase-js/releases/tag/v2.49.9

Please update, and let me know if it worked for your case.

Thanks.

Ok created a new version that should cover all versions. Would be really useful to get some help testing version 2.49.9-next.1

Here’s an image with a expo project; node testing; browser testing Image

we’re releasing a next version of supabase-js to try and test out if a fix works: https://github.com/supabase/supabase-js/pull/1395

Do I still need the workaround with the metro.config.js or the v2.50.0 solves everything?

Be aware that this is not the final version as my testing found some realtime-js issues but I will focus on fixing them so we can ship this ASAP.

Sorry for the delay and know that we are already working on our side to improve our testing methodology so we prevent issues like this in the future by testing multiple runtimes, bundlers, etc.

just wanna thank you @brentvatne for all of the work you do to keep the community moving. Your work directly correlates to the amount of hair I have left in my head because i’m not pulling it out 🙃.

Hi there, is there any solution for this? I am getting the same error and haven’t got a fix by now

this next version will be bumped to a patch release (2.49.5) this week as there are no breaking changes and only additive changes and fixes

Yes it has been solved in 2.49.5-next.5 we are just doing due diligence of testing it in multiple scenarios and giving enough time for feedback.

2.49.5 itself, with the fix, will be released next week.

awesome! I’m still trying to finalise some issues where some timers see to not be stopped at the correct time which might also be impacting operations but this means that we are close to actually release the fix properly

@EmilioMirasola thank you for verifying 🙏

@writeriks yes currently trying to fix this 🤦 I added a regression so I’m trying to focus on fixing that so I can release the proper patch

@supabase/supabase-js@2.49.5-next.1

THIS WORKED PERFECTLY! Thank you

hi there! this is the same issue as supabase/realtime-js#415 the teams at expo and supabase have been discussing this and a fix is in progress. you can disable the package exports configuration in metro as described here: // metro.config.js const { getDefaultConfig } = require(‘expo/metro-config’); /** @type {import(‘expo/metro-config’).MetroConfig} */ const config = getDefaultConfig(__dirname); config.resolver.unstable_enablePackageExports = false; module.exports = config;

This also worked for me!

@jessewindebank1809 when I add this line to my metro.config.js file and restart the app the app crashes. This is what my current metro.config.js file looks like.

const { getDefaultConfig } = require('expo/metro-config');

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config;

This is what npm ls ws shows

├─┬ @react-native-community/cli@18.0.0
│ └─┬ @react-native-community/cli-server-api@18.0.0
│   └── ws@6.2.3 deduped
├─┬ @redux-devtools/remote@0.9.5
│ └─┬ socketcluster-client@19.2.3
│   └── ws@8.18.2
├─┬ @supabase/supabase-js@2.49.4
│ └─┬ @supabase/realtime-js@2.11.2
│   └── ws@8.18.2
├─┬ expo@53.0.7
│ └─┬ @expo/cli@0.24.11
│   ├─┬ @react-native/dev-middleware@0.79.2
│   │ └── ws@6.2.3 deduped
│   └── ws@8.18.2
├─┬ metro@0.82.2
│ └── ws@7.5.10
└─┬ react-native@0.76.7
  ├─┬ @react-native/community-cli-plugin@0.76.7
  │ ├─┬ @react-native/dev-middleware@0.76.7
  │ │ └── ws@6.2.3 deduped
  │ └─┬ metro@0.81.4
  │   └── ws@7.5.10
  ├─┬ react-devtools-core@5.3.2
  │ └── ws@7.5.10
  └── ws@6.2.3

Hello Supabase team. Please urgently fix this issue. Because due to this issue my whole app is breaking. I was not facing this issue in Expo SDK 51 but when i migrated my codebase to latest Expo SDK 53 this issue keeps on popping. And as supabase is my backend. So my app is not functional at all. Please supabase team if you are reading this, then fix this issue ASAP.

Thank you Prince

The issue is still there I tried to downgrade the expo version but If I downgrade the expo app and simulator doesn’t want to run the app so we are cooked chat.

as @brentvatne mentioned, after adding his suggestion to the metro.config.js i was able to build eas builds for ios and android and was able to run it again on ios. (didnt test android run yet)

please can you help me do you have a contact please??

hi there! this is the same issue as supabase/realtime-js#415

the teams at expo and supabase have been discussing this and a fix is in progress. you can disable the package exports configuration in metro as described here:

// metro.config.js const { getDefaultConfig } = require(‘expo/metro-config’);

/** @type {import(‘expo/metro-config’).MetroConfig} */ const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config;

it doesn’t work 😦 still same error even after rebuilding eas local development build and cleaning the cache etc etc :

Android Bundling failed 23646ms index.js (2836 modules)
The package at "node_modules\ws\lib\stream.js" attempted to import the Node standard library module "stream".
It failed because the native React runtime does not include the Node standard library.
Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries

@brentvatne

I am going back to expo sdk 52.0.46 😦 sad sad 😦

My metro config


const { getDefaultConfig } = require('expo/metro-config')
const { getSentryExpoConfig } = require('@sentry/react-native/metro')

const config = getDefaultConfig(__dirname)

// Apply your existing modifications to the defaultConfig
config.transformer.minifierConfig.compress.drop_console = true

// https://stackoverflow.com/questions/72158122/expo-firebase-authentication-while-trying-to-resolve-module-idb-from-file
// Fix for Firebase Authentication module resolution issue
config.resolver.assetExts.push('cjs')

// Add the unstable_conditionNames configuration
config.resolver.unstable_enablePackageExports = false

// Wrap the modified config with Sentry's config
module.exports = getSentryExpoConfig(__dirname, config)

Hi all, since we had to rollback the release, this fix is currently only on 2.49.5-next.5, to summarize:

  • 2.49.5-next.5: expo compatibility fix
  • 2.49.5
  • 2.49.6:works on expo, but broke browser, so we had to revert it
  • 2.49.7: same as 2.49.5

If your project is Expo, use 2.49.5-next.5, otherwise, use latest stable version, 2.49.7.

Thanks.

Upgrading to @supabase/supabase-js": "^2.49.5-next.4 worked for me

this works for me

const { getDefaultConfig } = require("expo/metro-config");

const { withNativeWind } = require("nativewind/metro");

const config = getDefaultConfig(__dirname);

/** @type {import('expo/metro-config').MetroConfig} */
config.resolver.unstable_enablePackageExports = false;

module.exports = withNativeWind(config, { input: "./app/global.css" });

const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);

// ⬇️ temporary workaround for the “stream” / Node core‑module error
config.resolver.unstable_enablePackageExports = false;

module.exports = config;

#edited This thing works

I upgraded to v2.49.9 and confirm it’s working now.

Thank you for the fix! I’ve updated to supabase-js v2.49.9 and can confirm it’s working correctly.

This workaround worked for me

-add a new file at project root metro.config.js and put this in it:

const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);

// ⬇️ temporary workaround for the “stream” / Node core‑module error
config.resolver.unstable_enablePackageExports = false;

module.exports = config;

-delete node_modules, -uninstall expo cli using npm uninstall -g expo-cli

run command npm install to reinstall

run command npx expo start --clear to start it back up

This fix worked for me I hope it works for somebody else.

This case worked for me, I recommend you test it.

Image

Following

Until this issue is fully resolved, you can temporarily fix it by adding the following line to your metro.config.js:

// metro.config.js

const { getDefaultConfig } = require('expo/metro-config')

module.exports = (() => {
  const config = getDefaultConfig(__dirname)

  // Temporary fix for Node.js module resolution issue
  config.resolver.unstable_enablePackageExports = false

  return config
})()

Wasn’t the issue resolved in @supabase/supabase-js@2.49.5-next.1?

I’m using the latest compatible version of the @supabase/supabase-js package with Expo SDK 53, but I’m still getting this error.

It’s incredibly frustrating to be stuck in a loop of errors like that! Let’s try to distill the problem into a clear and concise message you can use in a forum. How about this:

"Experiencing an issue using Supabase.js with Expo SDK 53. I’m encountering the error: ‘The package at “node_modules\ws\lib\stream.js” attempted to import the Node standard library module “stream”’.

I’ve attempted solutions like creating a custom Metro config and using polyfills, but the original error persists, and new errors seem to appear after each attempt.

Has anyone else encountered this specific issue with Supabase.js and Expo SDK 53, and if so, what steps did you take to resolve it? Any insights or suggestions would be greatly appreciated

I was having the same issue and adding the metro.config was not working on my project… so I decided to start a new project and transferred all my files from my original project to the new one, and that, along with a metro.config.js file, worked well…I have no idea why it worked on a new project, but not the old one, but it did… Also, if you’re using any imports from rneui/themed, remove them

A fix for this is expected by?

When I try to register a new user I get this error [TypeError: Network request failed], I tried various fixes, but nothing works…

@blukasik77 If you are testing with an iOS simulator, check if the simulator is running 18.4. Simulators running this version have a bug. You can fix this (for now) by testing on iOS 18.3.1. That solved the ‘network request failed’ errors for me. Apparantly a fix for the simulator is underway and ‘working’ on beta versions of XCode.

Best to also use the config.resolver.unstable_enablePackageExports = false; fix just to be sure

hi there! this is the same issue as supabase/realtime-js#415

the teams at expo and supabase have been discussing this and a fix is in progress. you can disable the package exports configuration in metro as described here:

// metro.config.js const { getDefaultConfig } = require(‘expo/metro-config’);

/** @type {import(‘expo/metro-config’).MetroConfig} */ const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config;

This works for me, I am using react native CLI and not expo

This likely works as long as you don’t subscribe to any Realtime channels in the code — for example, using supabase.auth.onAuthStateChange. As soon as a Realtime feature is used, the React Native runtime (with Expo 53) conflicts with Node.js dependencies like ws or https, causing the app to crash.

Hello Supabase team. Please urgently fix this issue. Because due to this issue my whole app is breaking. I was not facing this issue in Expo SDK 51 but when i migrated my codebase to latest Expo SDK 53 this issue keeps on popping. And as supabase is my backend. So my app is not functional at all. Please supabase team if you are reading this, then fix this issue ASAP.

Thank you Prince is supabase team know this problem?? since many days ago still we suffering and no feedback from them

hi there! this is the same issue as supabase/realtime-js#415

the teams at expo and supabase have been discussing this and a fix is in progress. you can disable the package exports configuration in metro as described here:

// metro.config.js const { getDefaultConfig } = require(‘expo/metro-config’);

/** @type {import(‘expo/metro-config’).MetroConfig} */ const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config;

This workaround worked for me! Will use this until the fix supabase and expo are working on is released. Thanks.

Thank you. I have disabled the unstable_enablePackageExports which worked for me.

I’ve been testing this out and seeing something peculiar on 2.49.9-next.1. Curious if others are running into issues where network calls are either failing or never load. No issues prior to this on Expo 52.

Edit: For more information, if i do a fresh yarn ios to get a new build on my simulator, it will work okay for a little while. But after some hot reloads it starts to fail all network requests.

Yeah I’m getting the same thing on my end. Happens on start up usually and I can’t call rpc either since it always goes to network errors.

I’ve been testing this out and seeing something peculiar on 2.49.9-next.1. Curious if others are running into issues where network calls are either failing or never load. No issues prior to this on Expo 52.

Edit: For more information, if i do a fresh yarn ios to get a new build on my simulator, it will work okay for a little while. But after some hot reloads it starts to fail all network requests.

Edit2: Some logs, though not super helpful (to me):

Supabase RPC response received {"dataLength": 0, "errorCode": "", "errorDetails": "TypeError: Network request failed at anonymous (http://192.168.0.157:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.bytecode=1&transform.routerRoot=app&unstable_transformProfile=hermes-stable:9642:33)", "errorHint": "", "errorMessage": "TypeError: Network request failed", "hasData": false, "hasError": true}

This is the thing I hate most about expo, they force you to always update to the latest version, and after you update you get showered with bugs from different libraries that haven’t configured the update yet, which will never make your app production ready. Really considering not using expo anymore…

Compiles for me on an expo 53.0.9 app. Not using any streaming features though but it broke the build before

Yeah bump your deps up to:

npm install @supabase/supabase-js@2.49.5-next.5

fixes the following Expo issue:

iOS Bundling failed 11751ms node_modules\expo-router\entry.js (1652 modules) The package at “node_modules\ws\lib\stream.js” attempted to import the Node standard library module “stream”.
Thank god for @grdsdev

New version now available, please do provide feedback so we can close this issue if fixed.

Version is 2.49.6

Thank you for the patience and for helping us.

Do you still need this in the metro config?

config.resolver.unstable_enablePackageExports = false;

My code returns to the stream error when I remove it

Logs for your project will appear below. Press Ctrl+C to exit. Web Bundled 27881ms node_modules/expo-router/entry.js (2436 modules) LOG [web] Logs will appear in the browser console Android Bundling failed 62558ms node_modules/expo-router/entry.js (2853 modules) The package at “node_modules/@supabase/realtime-js/node_modules/ws/lib/websocket.js” attempted to import the Node standard library module “https”. It failed because the native React runtime does not include the Node standard library. Learn more › Stopped server

my app is working fine in ios and web but for andriod getting this error sometimes stream module issue or realtime module issue

$ bun expo start --web --tunnel --clear

Add Bellow codes in your project root

// metro.config.js const { getDefaultConfig } = require(‘expo/metro-config’);

/** @type {import(‘expo/metro-config’).MetroConfig} */ const config = getDefaultConfig(__dirname);

config.resolver.unstable_enablePackageExports = false;

module.exports = config;

@EricBidopa next.1 isn’t good enough.

do

npm install @supabase/supabase-js@2.49.5-next.5

Alright. Please comment here when it is released so i get the notification. A lot of people can’t use the expo go app on iphone because of this.

@Krishnachaitanya-dev would you be able to share your configuration?

Upgrading to @supabase/supabase-js": "^2.49.5-next.4 also worked for me

Following

Until this issue is fully resolved, you can temporarily fix it by adding the following line to your metro.config.js:

// metro.config.js

const { getDefaultConfig } = require('expo/metro-config')

module.exports = (() => {
  const config = getDefaultConfig(__dirname)

  // Temporary fix for Node.js module resolution issue
  config.resolver.unstable_enablePackageExports = false

  return config
})()

Wasn’t the issue resolved in @supabase/supabase-js@2.49.5-next.1?

Until this issue is fully resolved, you can temporarily fix it by adding the following line to your metro.config.js:

// metro.config.js

const { getDefaultConfig } = require('expo/metro-config')

module.exports = (() => {
  const config = getDefaultConfig(__dirname)

  // Temporary fix for Node.js module resolution issue
  config.resolver.unstable_enablePackageExports = false

  return config
})()

waiting for a solution to the problem:

ERR ->

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: rnmpas@1.0.0 npm error Found: react-native-safe-area-context@5.4.0 npm error node_modules/react-native-safe-area-context npm error react-native-safe-area-context@“^5.4.0” from the root project npm error npm error Could not resolve dependency: npm error peer react-native-safe-area-context@“^3.1.9 || ^4.0.0” from @rneui/base@4.0.0-rc.7 npm error node_modules/@rneui/base npm error peer @rneui/base@“4.0.0-rc.7” from @rneui/themed@4.0.0-rc.8 npm error node_modules/@rneui/themed npm error @rneui/themed@“*” from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error /Users/dieresdasilvamendes/.npm/_logs/2025-05-07T21_34_47_228Z-eresolve-report.txt npm error A complete log of this run can be found in: /Users/dieresdasilvamendes/.npm/_logs/2025-05-07T21_34_47_228Z-debug-0.log Error: npm install --save @supabase/supabase-js @rneui/themed react-native-url-polyfill exited with non-zero code: 1

Image

This is another issue. I had the same issue though and I managed to solve it by just trying a lot of stuff. I deleted the node_modules folder and package-lock.json file, then I made some adjustments to the package.json file (the version of some packages). Then I did “npm install”, “npx expo install --fix” and lastly “expo doctor” and then it worked.

I am not sure what was the root cause, but I managed to solve it by just trying like this.

waiting for a solution to the problem:

ERR ->

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: rnmpas@1.0.0 npm error Found: react-native-safe-area-context@5.4.0 npm error node_modules/react-native-safe-area-context npm error react-native-safe-area-context@“^5.4.0” from the root project npm error npm error Could not resolve dependency: npm error peer react-native-safe-area-context@“^3.1.9 || ^4.0.0” from @rneui/base@4.0.0-rc.7 npm error node_modules/@rneui/base npm error peer @rneui/base@“4.0.0-rc.7” from @rneui/themed@4.0.0-rc.8 npm error node_modules/@rneui/themed npm error @rneui/themed@“*” from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error /Users/dieresdasilvamendes/.npm/_logs/2025-05-07T21_34_47_228Z-eresolve-report.txt npm error A complete log of this run can be found in: /Users/dieresdasilvamendes/.npm/_logs/2025-05-07T21_34_47_228Z-debug-0.log Error: npm install --save @supabase/supabase-js @rneui/themed react-native-url-polyfill exited with non-zero code: 1

Image

There is always issues when upgrading expo sdk so just dont. Use a dev build instead and downgrade to sdk 52

I ´ve a problem w that. mi expo go app in my physic iphone device is updated to work only for SDK 53, I can´t test correctly because of that issue, I’m forced to update to the latest version of the Expo SDK, which causes the app to crash when using it with Supabase. Currently, I can only use and test the app on emulators. 😦

If you create a development build you dont need the expo go app and it wont force you to upgrade SDK. Definitely not as smooth as expo go but seems like the only option right now.

There is always issues when upgrading expo sdk so just dont. Use a dev build instead and downgrade to sdk 52