I have been struggling with the following error in my expo project . here are the list of package installed, versions list and the error logs i faced. please help me how can i resolve this issue. its not running on my machine.
both npm start and expo start commands are not working
node --version #v16.20.2npm --version #8.19.4nvm --version #0.39.1expo --version #6.3.10npx react-native --version #15.1.3
Npm start shows this error
ReferenceError: ReadableStream is not defined at Object.<anonymous> (/Users/projectfolder/Documents/project/myprojectname/node_modules/undici/lib/web/fetch/response.js:528:3) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
and expo start says
│ The global expo-cli package has been deprecated. ││││ The new Expo CLI is now bundled in your project in the expo package. ││ Learn more: https://blog.expo.dev/the-new-expo-cli-f4250d8e3421. ││││ To use the local CLI instead (recommended in SDK 46 and higher), run: ││› npx expo <command> │││└───────────────────────────────────────────────────────────────────────────┘Starting project at /Users/projectfolder/Documents/project/myprojectnameSome dependencies are incompatible with the installed expo package version: - expo-updates - expected version: ~0.27.1 - actual version installed: 0.26.19 - react-native - expected version: 0.76.7 - actual version installed: 0.76.6Your project may not work correctly until you install the correct versions of the packages.To install the correct versions of these packages, please run: expo doctor --fix-dependencies,or install individual packages by running expo install [package-name ...]ExpoMetroConfig.loadAsync is not a functionTypeError: ExpoMetroConfig.loadAsync is not a function at runMetroDevServerAsync (/Users/projet/.nvm/versions/node/v16.20.2/lib/node_modules/expo-cli/node_modules/@expo/dev-server/src/MetroDevServer.ts:86:45) at startDevServerAsync (/Users/projet/.nvm/versions/node/v16.20.2/lib/node_modules/expo-cli/node_modules/xdl/src/start/startDevServerAsync.ts:75:77) at startAsync (/Users/projet/.nvm/versions/node/v16.20.2/lib/node_modules/expo-cli/node_modules/xdl/src/start/startAsync.ts:84:41)
my package.json looks this
{"name": "myprojectname","version": "1.0.0","main": "./AppEntry.js","scripts": {"start": "expo start --dev-client","android": "expo run:android","ios": "expo run:ios","web": "expo start --web" },"dependencies": {"@expo-google-fonts/birthstone": "^0.2.3","@expo-google-fonts/cookie": "^0.2.3","@expo-google-fonts/dancing-script": "^0.2.3","@expo-google-fonts/great-vibes": "^0.2.3","@expo-google-fonts/inter": "^0.2.3","@expo-google-fonts/lexend": "^0.2.3","@expo-google-fonts/pacifico": "^0.2.3","@expo-google-fonts/satisfy": "^0.2.3","@expo-google-fonts/squada-one": "^0.2.3","@expo-google-fonts/whisper": "^0.2.3","@expo/vector-icons": "^14.0.2","@gorhom/bottom-sheet": "^5.0.6","@react-native-community/datetimepicker": "8.2.0","@react-native-community/netinfo": "^11.4.1","@react-native-community/slider": "4.5.5","@react-native-picker/picker": "2.9.0","@react-navigation/bottom-tabs": "^7.2.0","@react-navigation/drawer": "^7.0.19","@react-navigation/native": "^7.0.12","@react-navigation/native-stack": "^7.1.13","@react-navigation/stack": "^7.0.18","expo": "~52.0.28","expo-camera": "~16.0.14","expo-checkbox": "~4.0.1","expo-font": "~13.0.2","expo-image-picker": "~16.0.5","expo-linear-gradient": "~14.0.2","expo-location": "~18.0.5","expo-splash-screen": "~0.29.21","expo-status-bar": "~2.0.1","expo-updates": "~0.26.15","lodash": "^4.17.21","lottie-react-native": "7.1.0","moment": "^2.30.1","patch-package": "^8.0.0","postinstall-postinstall": "^2.1.0","react": "18.3.1","react-native": "0.76.6","react-native-gesture-handler": "~2.20.2","react-native-get-random-values": "^1.11.0","react-native-gifted-chat": "^2.6.5","react-native-otp-entry": "^1.7.3","react-native-paper": "^5.12.5","react-native-reanimated": "~3.16.1","react-native-safe-area-context": "4.12.0","react-native-screens": "~4.4.0","react-native-webview": "13.12.5","uuid": "^11.0.5" },"devDependencies": {"@babel/core": "^7.25.2","@react-native-community/cli": "^15.1.3","@types/lodash": "^4.17.14","@types/react": "~18.3.12","typescript": "^5.3.3" },"jest": {"moduleNameMapper": {"lottie-react-native": "<rootDir>/__mocks__/lottieMock.js" } },"private": true}