question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed at `npm run dev`

See original GitHub issue

For those people who encounter the following error messages:

$ vue init webpack-simple simple-example
$ cd simple-example
$ npm install
$ npm run dev

ajhsu-mbpr:simple-example ajhsu$ npm run dev

> simple-example@1.0.0 dev /Users/ajhsu/Git/vue/simple-example
> cross-env NODE_ENV=development webpack-dev-server --open --hot

webpack-dev-server 2.10.0
webpack 3.10.0
Usage: https://webpack.js.org/configuration/dev-server/

Config options:
  --config       Path to the config file
                         [string] [default: webpack.config.js or webpackfile.js]
  --config-name  Name of the config to use                              [string]

....

  --open-page   Open default browser with the specified page            [string]

Missing argument values: config, config-name, context, entry, module-bind, module-bind-post, module-bind-pre, output-path, output-filename, output-chunk-filename, output-source-map-filename, output-public-path, output-jsonp-function, output-library, output-library-target, records-input-path, records-output-path, records-path, define, target, watch-aggregate-timeout, devtool, resolve-alias, resolve-extensions, resolve-loader-alias, optimize-max-chunks, optimize-min-chunk-size, prefetch, provide, plugin, open-page
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! simple-example@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 simple-example@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!     /Users/ajhsu/.npm/_logs/2018-01-09T09_28_10_300Z-debug.log

It seems caused by a known issue on webpack-dev-server@2.10.0. While the generated vue project is requiring webpack-dev-server@^2.9.1 which may install the broken version 2.10.0 that causes the error.

You can now temporary fix it by assigning the version of webpack-dev-server to 2.9.7 in your package.json like this: "webpack-dev-server": "2.9.7".

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:20
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

43reactions
roytimecommented, Jan 9, 2018

yarn remove webpack-dev-server yarn add webpack-dev-server@2.9.1 --dev yarn run dev

OK!

15reactions
ajhsucommented, Jan 23, 2018

@rgalaxy That’s not the problem related to this issue;

I think It’s simply because you haven’t run npm install before npm run dev or npm run build yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why I can not run Npm run dev? - Stack Overflow
Basically delete the node_modules folder and package-lock.json file , clear cache and do an npm install. Worked for me. Share.
Read more >
npm run dev error - Laracasts
It could be caused by your installed packages being bad. Try this. Copy Code npm cache clean --force rm -rf node_modules npm install...
Read more >
Error on npm run dev with Laravel Project · Issue #2761 - GitHub
I get following error when i am try to run npm run dev command on windows power-shell ... npm ERR! npm ERR! Failed...
Read more >
VueJS website won't deploy npm run dev gives error
VueJS website won't deploy npm run dev gives error: "build command failed" ; Base directory: Not set ; Build command: npm run build...
Read more >
npm run dev issue (npm ERR! code ELIFECYCLE) - scmGalaxy
Error :- ; Solution:- ; Step 1:- Run this command to verify cache ; Step 2:- Recheck your package.json and webpack.mix.js file it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found