【问题标题】:Webpack: Is this the intended behavior?Webpack:这是预期的行为吗?
【发布时间】:2016-11-30 16:11:08
【问题描述】:

我正在使用带有 VueJS v2.x 的 webpack-simple 模板。首先,运行“npm run build”失败。运行“npm run dev”有效。如果在运行“npm run dev”之前我的源代码中有错误,则该命令将失败。 我很抱歉没有显示任何代码,但我不需要帮助来修复我的代码。我想知道 webpack 是否是这样工作的。如果有错误,它会吐出无用的错误消息。这是错误:

npm ERR! Windows_NT 10.0.10586
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 v7.1.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! gg@ dev: `cross-env NODE_ENV=development webpack-dev-server --open --inline --hot`
npm ERR! Exit status 3221226505
npm ERR!
npm ERR! Failed at the gg@ dev script 'cross-env NODE_ENV=development webpack-dev-server --open --inline --hot'.
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 gg package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development webpack-dev-server --open --inline --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs gg
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls gg
npm ERR! There is likely additional logging output above.

【问题讨论】:

    标签: webpack vuejs2


    【解决方案1】:

    问题来自节点和 npm。我在win10上运行并且使用的是节点v7.10。降级到 6.9 后,一切都开始正常运行

    【讨论】:

      猜你喜欢
      • 2019-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-09
      • 2021-05-05
      • 2010-12-01
      • 2017-03-12
      相关资源
      最近更新 更多