Search code examples
reactjslinuxubuntucontinuous-integrationreact-app-rewired

React app rewired doesnt run under port 1024


I have this React application that needs to run under port 443. Usually it works fine but now i got a new computer and for some odd reason i cant run it anymore.

I have two ways for this. A custom script in the package.json file and it should also work when ran with sudo. sudo npm start or npm run https.

The port is defined in the .env file by default.

This is what my package.json looks like
enter image description here

When i run sudo npm start the expected behaviour is for it to run, without sudo, it should warn me that Admin permissions are required. This is what is happening with sudo aswell.

$ sudo npm start
enter image description here

or with the other command

$ npm run https
enter image description here

Not quite sure what to do in this situation. Anyone have any idea how to make it work ?


Solution

  • Running this command fixed the issue for me.

    sudo sysctl net.ipv4.ip_unprivileged_port_start=443