1. Open your package.json file: Navigate to your project directory and open the package.json file in your preferred text editor.

  2. 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.

  3. 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"
    
  4. Save the changes: Once you've updated the port number, save the package.json file.

  5. 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