Search code examples
react-nativewebpackexpometro-bundler

Why am I suddenly having the webpack metro bundler instead of the normal metro bundler?


Forgive me if this sounds silly or obvious, but I have been working fine on my various projects using expo for a while now, but then all of a sudden, midway into my project, whenever I start the metro bundler using expo start and try running on android device, I suddenly get an error saying packager is not running at 19001, and whenever it happens, i notice the metro bundler is slightly different as shown below where it says "Starting webpack on port 19006 in development mode" Webpack metro bundler instead of the normal "Starting Metro Bundler on port 19001". But then when I try opening my previous projects using expo start or starting a brand new project, the error does not occur and the normal metro bundler shows up and everything works fine(at least initially)

This is the package.json of my current error project

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~38.0.1",
    "expo-status-bar": "^1.0.0",
    "react": "~16.11.0",
    "react-dom": "~16.11.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz",
    "react-native-web": "~0.11.7",
    "react-redux": "^7.2.0",
    "redux": "^4.0.5"
  },
  "devDependencies": {
    "@babel/core": "^7.8.6",
    "babel-preset-expo": "~8.1.0"
  },
  "private": true
}

Any advice would be appreciated


Solution

  • I solved it. It was a blunder on my part. The issue was coming from my installation of redux. While installing redux, i used npm install redux instead of npm install --save redux. I had to uninstall redux and react-redux using npm uninstall --save redux react-redux and reinstalled them using npm install --save redux react-redux . Everything works fine now