Problem:- On running the npm run dev, command after installing vue-cli, following error is thrown?
Starting dev server…
events.js:160
      throw er; // Unhandled ‘error’ event
      ^

Error: listen EADDRINUSE :::8080
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at Server._listen2 (net.js:1262:14)
    at listen (net.js:1298:10)
    at Server.listen (net.js:1376:9)….

Solution:-
From above error we can get an hint “listen EADDRINUSE :::8080”,
issue is our port 8080 is already used, thus vue server is NOT getting started.

Easy solution, just change the port in /config/index.js file

  dev: {
    env: require(‘./dev.env’),
    port: 8082,
    autoOpenBrowser: true, 

Re-run the app again and it’ll launch without any error on new port

vue.js launching page

Keep learning and Keep sharing.

One Reply to “Vue.js npm run dev error with vue-cli”

Leave a Reply

Your email address will not be published. Required fields are marked *