Skip to content

Failed at npm run dev #714

@ajhsu

Description

@ajhsu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions