Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run dev error #332

Closed
onlyfzz opened this issue Feb 4, 2017 · 17 comments
Closed

npm run dev error #332

onlyfzz opened this issue Feb 4, 2017 · 17 comments

Comments

@onlyfzz
Copy link

onlyfzz commented Feb 4, 2017

 "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

@egoist egoist closed this as completed Feb 4, 2017
@Smith-Cruise
Copy link

the same as me

@posva
Copy link
Member

posva commented Feb 6, 2017

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

@onlyfzz
Copy link
Author

onlyfzz commented Feb 6, 2017

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.

@Smith-Cruise
Copy link

@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

@anuj-know
Copy link

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

thanks

@lilili001
Copy link

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

@nandymandy1
Copy link

nandymandy1 commented Aug 30, 2017

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! meetupapp@1.0.0 dev: node build/dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meetupapp@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 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

@fanibig
Copy link

fanibig commented Sep 20, 2017

vuejs@1.0.0 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! vuejs@1.0.0 dev: cross-env NODE_ENV=development webpack-dev-server --open --hot
      npm ERR! Exit status 1
      npm ERR!
      npm ERR! Failed at the vuejs@1.0.0 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.

@nomantufail
Copy link

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

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

@nomantufail
Copy link

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

@rgalaxy
Copy link

rgalaxy commented Jan 22, 2018

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! my-app@1.0.0 dev: cross-env NODE_ENV=development webpack-dev-server --open --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@1.0.0 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?

@nomantufail
Copy link

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

@anson-GH
Copy link

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

@newsapkota
Copy link

newsapkota commented Oct 1, 2018

npm install --save-dev cross-env

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

@cscthian
Copy link

cscthian commented Nov 6, 2018

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"

@vtransy
Copy link

vtransy commented Mar 4, 2020

run

npm install

before run

npm run dev

command

@DamilolaAjayi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests