有没有人遇到过这个?我甚至无法运行webpack,我在第186行的webpack.js中收到错误。这刚刚开始发生在我在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
我的节点版本是节点--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 :(得分:3)
遇到了同样的问题,并且还使用了节点版本0.12.0。更改为节点版本6.9.4,然后webpack 1成功运行。
答案 1 :(得分:1)
使用webpack 2.2.0-rc.3似乎对我有用,所以你的package.json中的“webpack”:“2.2.0-rc.3”或'npm install webpack@2.2.0-rc.3 ”。所有其他版本都给我相同或其他问题