环境版本:
node.js v4.4.7
npm 2.15.8
安装步骤:
1.全局安装webpack
npm install webpack -g
2.在项目中安装webpack依赖,防止部署是与本地的依赖包不一致导致错误 ,指定版本
npm install webpack@1.15.0 --save-dev
安装后查看webpack版本
webpack -v
报如下错误信息:
D:\workspace>webpack -v
C:\Users\XXX\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:89
let notify =
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at star