Connect with us

How to change listening port in react native?

If you are using react native android and having face issue packager can’t listen on port than use below command to change port:

react-native start –port 9987

OR go into the file path

my_app\node_modules\react-native\local-cli\server\server.js and chnage port here:

 module.exports = {
      name: 'start',
      func: server,
      description: 'you are starting the webserver',
      options: [{
        command: '--port [number]',
        default: 9987,
        parse: (val) => Number(val),

Your Answer

Please login or Register to submit your answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.

Log In

Subscribe to our newsletter

Enter your email address to subscribe to blog and receive notifications of new articles by email.
100% Privacy. No spam guaranteed