Trouble expo-secure-store & web3auth

The following error occurred when using web3auth in Expo.

code

import * as SecureStore from "expo-secure-store";
import Web3Auth from '@web3auth/single-factor-auth-react-native';
const web3auth = new Web3Auth(SecureStore, {
  clientId,
  web3AuthNetwork: 'sapphire_mainnet',
  usePnPKey: false, // By default, this sdk returns CoreKitKey
});

package.json

{
  "name": "my-app",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.0",
    "@gorhom/bottom-sheet": "^4.6.3",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-navigation/native": "^6.0.2",
    "@tanstack/react-query": "^5.45.1",
    "@web3auth/ethereum-provider": "^8.7.0",
    "@web3auth/single-factor-auth-react-native": "^2.1.0",
    "autoprefixer": "^10.4.19",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "dotenv": "^16.4.5",
    "expo": "~51.0.14",
    "expo-dev-client": "~4.0.18",
    "expo-font": "~12.0.7",
    "expo-linear-gradient": "~13.0.2",
    "expo-linking": "~6.3.1",
    "expo-router": "~3.5.16",
    "expo-secure-store": "~13.0.2",
    "expo-splash-screen": "~0.27.5",
    "expo-status-bar": "~1.12.1",
    "expo-system-ui": "~3.0.6",
    "expo-web-browser": "~13.0.3",
    "nativewind": "^2.0.11",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-intl": "^6.6.8",
    "react-native": "0.74.2",
    "react-native-actions-sheet": "^0.9.3",
    "react-native-auth0": "^3.2.1",
    "react-native-gesture-handler": "~2.16.1",
    "react-native-reanimated": "~3.10.1",
    "react-native-safe-area-context": "4.10.1",
    "react-native-screens": "3.31.1",
    "react-native-svg": "15.2.0",
    "react-native-web": "~0.19.10",
    "recoil": "^0.7.7",
    "tailwind-merge": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~18.2.45",
    "compression": "^1.7.4",
    "cors": "^2.8.5",
    "express": "^4.19.2",
    "jest": "^29.2.1",
    "jest-expo": "~51.0.1",
    "morgan": "^1.10.0",
    "react-test-renderer": "18.2.0",
    "tailwindcss": "^3.3.2",
    "typescript": "~5.3.3"
  },
  "private": true
}

Warm Regards

Hey @truepartner312, welcome aboard. This looks like polyfill issue, you can checkout the details steps to resolve bundler polyfill issue.