vue-cli: npm run dev error

 "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.7.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! douyu@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the douyu@1.0.0 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 douyu 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 douyu
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls douyu
npm ERR! There is likely additional logging output above.

when i input npm run dev,these errors appear. But my npm and node’s version are satisfy condition. npm-4.1.2 node-6.7.0. why the server.js cant run

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

npm install webpack-dev-server@2.9.7 --save-dev

run this command in your project directory. i hope this might help.

npm install --save-dev cross-env

Thanks, this save my day, it’s works.

@matan-modai i googled “webpack template vuejs” and found it on Github https://github.com/vuejs-templates/webpack. then in Issues section look at this issue “Bug with webpack-dev-server 2.10.0 - Unable to start webpack-dev-server” and there is a solution mentioned.

Tenia el mismo problema, pero ninguna sugerencia soluciono mi problema, a quien le pase lo mismo, esto fue lo que me ayudo: como mi proyecto no esta creado en el directorio raíz del sistema operativo, si no en otro disco, resulta que se necesita permisos para acceder a configuraciones relacionadas a levantar el servidor, por lo tanto solo tuve que ejecutar el comando “npm run serve” con permisos y todo funciono correctamente.

En mi caso es sistema operativo LinuxMint basado en ubuntu 18.04 todo se soluciono con “sudo npm run serve”

@rgalaxy try running this command first : npm install --save-dev cross-env

I have the same issue . and i check for var eslintFriendlyFormatter in build/webpack.base.conf.js . there is no such variable.

thanks