Open your package.json file:
Navigate to your project directory and open the package.json file in your preferred text editor.
Locate the "dev" script:
In the scripts section of the package.json file, locate the "dev" script. This script is typically used to start the Vite development server.
Update the port number:
Within the "dev" script, you'll find the command to start the Vite development server, which may look like this:
"dev": "vite --host --port 8888"
Save the changes:
Once you've updated the port number, save the package.json file.
Run the development server:
To apply the changes, run the "dev" script using npm or yarn in your terminal:
npm run dev
Last Updated : May 31, 2024