为了账号安全,请及时绑定邮箱和手机立即绑定

NPM中webpack 中 错误 webpackconfig.js

/ 猿问

NPM中webpack 中 错误 webpackconfig.js

慕沐5538138 2019-01-21 17:21:32
Jude@DESKTOP-Jude MINGW64 /f/workspace/mmall/mmall-fe (mmall_v1.0)              $ webpack                                                                       C:\Users\Jude\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 startup (node.js:139:18)                                                     at node.js:968:3

 

https://img3.mukewang.com/5c458e4400014ba207630288.jpg


查看完整描述

1 回答

?
pardon110

你开启了严格模式,在此情况下, 变量都必须要使用var声明

如若仍然想使用let块级声明,请不要用严格模式

查看完整回答
1 反对 回复 2019-01-21

添加回答

回复

举报

0/150
提交
取消
意见反馈 邀请有奖 帮助中心 APP下载
官方微信