Vue-cli: npm run dev error

Created on 4 Feb 2017  路  17Comments  路  Source: vuejs/vue-cli

 "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! [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 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

Most helpful comment

npm install [email protected] --save-dev

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

All 17 comments

the same as me

The issue should be opened in the template reproducing the error and with more information about the system it was run with

I think its a bug,when i cancel the eslint and npm run dev,it remind me i show install the eslint-friendly-formatter,last time i ignore the message so i dont konw what happend,but i think the module show be auto npm rather than manual.

@onlyfzz actually,i had resloved it just now.
First,find file build/webpack.base.conf.js.
Then delete var eslintFriendlyFormatter = require('eslint-friendly-formatter').
This problem is caused by canceling eslint,so you just need to delete that line in configuration

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

thanks

check if port 8080 used by another program,I just resolved this problem by changing port number

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
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 meetupapp 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 meetupapp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls meetupapp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\vueproj\vue-proj\npm-debug.log

I have been trying to run my vuejs/cli but i can't start my server

[email protected] dev E:\vertrigo\www\vuejs
cross-env NODE_ENV=development webpack-dev-server --open --hot

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

  • configuration.entry should be one of these:
    object { : non-empty string | [non-empty string] } | non-empty string | [non-empty string] | function
    The entry point(s) of the compilation.
    Details:

    • configuration.entry should be an object.

    • configuration.entry should be a string.

    • configuration.entry should NOT have duplicate items (items ## 1 and 3 are identical) ({

      "keyword": "uniqueItems",

      "dataPath": ".entry",

      "schemaPath": "#/definitions/common.nonEmptyArrayOfUniqueStringValues/uniqueItems",

      "params": {

      "i": 3,

      "j": 1

      },

      "message": "should NOT have duplicate items (items ## 1 and 3 are identical)",

      "schema": true,

      "parentSchema": {

      "items": {

      "minLength": 1,

      "type": "string"

      },

      "minItems": 1,

      "type": "array",

      "uniqueItems": true

      },

      "data": [

      "E:\Vertrigo\www\vuejs\node_modules\webpack-dev-server\client\index.js?http://localhost:8081",

      "webpack/hot/dev-server",

      "E:\vertrigo\www\vuejs\node_modules\webpack-dev-server\client\index.js?http://localhost:8080",

      "webpack/hot/dev-server",

      "./src/main.js"

      ]

      }).

      [non-empty string]

    • configuration.entry should be an instance of function

      function returning an entry object or a promise..

      npm ERR! code ELIFECYCLE

      npm ERR! errno 1

      npm ERR! [email protected] dev: cross-env NODE_ENV=development webpack-dev-server --open --hot

      npm ERR! Exit status 1

      npm ERR!

      npm ERR! Failed at the [email protected] dev script.

      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\irfan akram\AppData\Roaming\npm-cache_logs\2017-09-20T17_28_33_788Z-debug.log

please some one help.

npm install [email protected] --save-dev

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

@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.

hi @nomantufail i tried to run your command and its still have the same error

'cross-env' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: cross-env NODE_ENV=development webpack-dev-server --open --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Martin OP\AppData\Roaming\npm-cache_logs\2018-01-22T07_38_17_702Z-debug.log

you know what is wrong?

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

change the config >index.js port: 8080 to other port eg, port: 8081

npm install --save-dev cross-env

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

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"

run

npm install

before run

npm run dev

command

I had this issue and I cleared my npm cache with
npm cache clean --force
then

remove node modules folder
rm -rf node_modules

then

npm install

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshuajohnson814 picture joshuajohnson814  路  3Comments

miyamoto-san picture miyamoto-san  路  3Comments

BusyHe picture BusyHe  路  3Comments

JIANGYUJING1995 picture JIANGYUJING1995  路  3Comments

NathanKleekamp picture NathanKleekamp  路  3Comments