Webpack/Aws 最近停止部署,webpack.js 出现错误

标签 webpack webpack-dev-server

有人遇到过这种情况吗?我什至无法运行 webpack,我在 webpack.js 第 186 行收到错误。我在 AWS 上的配置刚刚开始发生这种情况

lib/node_modules/webpack/bin/webpack.js:186
		outputOptions.children = options.map(o => o.stats);
		                                       ^^

 SyntaxError: Unexpected token =>
     at exports.runInThisContext (vm.js:73:16)
     at Module._compile (module.js:443:25)
     at Object.Module._extensions..js (module.js:478:10)
     at Module.load (module.js:355:32)
     at Function.Module._load (module.js:310:12)
     at Function.Module.runMain (module.js:501:10)
     at startup (node.js:129:16)
     at node.js:814:3

我的Node版本是node --version ---- v0.12.10

  },
  "dependencies": {
    "bluebird": "~3.1.1",
    "blueimp-md5": "^2.1.0",
    "chunk-manifest-webpack-plugin": "0.0.1",
    "classnames": "^2.2.3",
    "extract-text-webpack-plugin": "~1.0.1",
    "file-loader": "~0.8.5",
    "grunt": "~0.4.2",
    "grunt-babel": "^6.0.0",
    "grunt-cli": "^1.2.0",
    "grunt-contrib-watch": "^1.0.0",
    "grunt-webpack": "^1.0.11",
    "install": "^0.6.1",
    "lodash": "^4.11.2",
    "npm": "^3.8.9",
    "pusher-js": "^3.0.0",
    "react-addons-css-transition-group": "^15.4.1",
    "react-addons-shallow-compare": "^15.4.1",
    "react-autosuggest": "^7.0.1",
    "react-burger-menu": "^1.10.9",
    "react-cropper": "^0.10.0",
    "react-dropzone": "^3.7.3",
    "react-flip-move": "^2.7.1",
    "react-logger": "^1.1.0",
    "react-responsive": "^1.2.5",
    "react-router": "^3.0.0",
    "react-tag-input": "^2.2.4",
    "react-tap-event-plugin": "^2.0.1",
    "react-timer-mixin": "^0.13.3",
    "react-toggle-button": "^2.1.0",
    "react-widgets": "^3.4.5",
    "reflux": "^5.0.3",
    "reflux-core": "^0.4.2",
    "superagent": "~1.6.1",
    "superagent-bluebird-promise": "~3.0.0",
    "webpack": "^1.13.0",
    "webpack-dev-server": "^1.14.1"
  }
}

有人遇到过这种情况吗?

最佳答案

遇到同样的问题,并且也使用节点版本 0.12.0。更改为node版本6.9.4,之后webpack 1成功运行。

关于Webpack/Aws 最近停止部署,webpack.js 出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41987472/

相关文章:

javascript - webpack 的库和客户端应用程序配置

webpack-dev-server 将哈希查询参数添加到 src 文件 URL

Javascript/网络包 : how to concatenate all json files in directory with a custom loop over files

javascript - Webpack:拆分 vendor 和应用程序代码

javascript - '[WDS] Disconnected!' 错误对 webpack 和 Vue.js 意味着什么?

node.js - 我的 vue.config 文件中的代理点是什么?

webpack - 如何修复这些 SockJS ssl 错误?

css - 网络包少。背景图片问题

jshint - webpack.DefinePlugin 和 jshint "is not defined"

typescript - 如何允许 CRA 中的命名空间?