I will be glad for any hit how to sort out following problem:
Node version: 6.9.1
For first, it might be relevant that:
✗ npm install -g vue-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
With sudo the installation was successful:
sudo npm install -g vue-cli
Succesfull inicialization
✗ vue init webpack vue-test-webpack
and installation
✗ cd vue-test-webpack
✗ npm install
But then:
✗ npm run dev
failed:
> [email protected] dev /Users/richard/Projects/front-end-frameworks-research/learn-vue/vue-test-webpack
> node build/dev-server.js
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:1257:14)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at EventEmitter.listen (/Users/richard/Projects/front-end-frameworks-research/learn-vue/vue-test-webpack/node_modules/express/lib/application.js:617:24)
at Object.<anonymous> (/Users/richard/Projects/front-end-frameworks-research/learn-vue/vue-test-webpack/build/dev-server.js:62:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-test-webpack package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vue-test-webpack
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vue-test-webpack
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/richard/Projects/front-end-frameworks-research/learn-vue/vue-test-webpack/npm-debug.log
Thanks for any hint.
It states in the error that something is already running on port 8080. That's your issue.
Thanks a lot, works when my local Apache is switched off.
Is there any easy way please how to choose another port number for
npm run dev
i.e. avoiding stop program running actually on :8080?
/project-directory/config/index.js ---> look for port number property
Try to use the simple webpack template like that:
$ vue init webpack-simple yourProjectName
$ cd yourProjectName
$ npm install
$ npm run dev
Most helpful comment
It states in the error that something is already running on port 8080. That's your issue.