Vue.js npm run dev error with vue-cli – User friendly Tech help
Problem:- On running the npm run dev, command after installing vue-cli, following error is thrown?
nStarting dev server…events.js:160 throw er; // Unhandled ‘error’ event
n
^
n
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)
n
at Server.listen (net.js:1376:9)….
n
Solution:-
nFrom above error we can get an hint “listen EADDRINUSE :::8080”,
nissue is our port 8080 is already used, thus vue server is NOT getting started.
n
Easy solution, just change the port in /config/index.js file
n
ndev: { env: require(‘./dev.env’),n
port: 8082,
n
n autoOpenBrowser: true,
nRe-run the app again and it’ll launch without any error on new port n
Keep learning and Keep sharing.