Home  >  Q&A  >  body text

Vue starts port 80 under mac and reports an error

MacOS starts the vue project, the port number is 80, it seems that ports below 1024 are disabled on mac. how to solve this problem

I hope everyone can help me solve the problem of enabling port 80 project under mac

P粉642919823P粉642919823379 days ago504

reply all(1)I'll reply

  • P粉121081658

    P粉1210816582023-09-07 09:55:43

    This error occurs when the port is already in use . You have two options to resolve this issue.

    • Termination port

    1. Use this command to check if the port is already in uselsof -i :80
    2. Kill the port using PID, if the port is in use kill {{PID}}, the port will be provided


      < /里>
    • Run the project on a different port

    You can actually run your vue application on a different port

    1. Use Npm -> npm runserve --port 8080
    2. Use Yarn -> yarnserve --port 8080

    reply
    0
  • Cancelreply