Error when starting Django React app with npm start: "Invalid options object" ( 'Something is already running on port 5432' )

`I have a Django-React application with PostgreSQL/MySQL. The app was working fine, until today I attempted to start my frontend using npm start. This is the first time I've encountered the following prompt:

? Something is already running on port 5432.

Would you like to run the app on another port instead? » (Y/n)

Opting for 'Y' leads to the subsequent error:

Would you like to run the app on another port instead? ... yes Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. options.allowedHosts[0] should be a non-empty string.

I haven't made any recent changes or installations. What should I do ?

I tried to change the start script in the package.json to "start": "set PORT=3000 && react-scripts start", but that didn't work. Additionally, I deleted node_modules, package-lock.json, and ran npm install, but I still got the same error message.

Back to Top