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

TypeError: this.addChunk is not a function打包时提示错误

TypeError: this.addChunk is not a function打包时提示错误

慕粉3422128 2019-04-26 10:29:23
$ webpack(node:14256) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` insteadC:\Users\wh\Desktop\mmall\doc\mmall-fe\node_modules\webpack\lib\optimize\CommonsChunkPlugin.js:59                                                chunk = this.addChunk(chunkName);                                                             ^TypeError: this.addChunk is not a function    at C:\Users\wh\Desktop\mmall\doc\mmall-fe\node_modules\webpack\lib\optimize\CommonsChunkPlugin.js:59:20    at Array.map (<anonymous>)    at C:\Users\wh\Desktop\mmall\doc\mmall-fe\node_modules\webpack\lib\optimize\CommonsChunkPlugin.js:54:42    at SyncBailHook.eval [as call] (eval at create (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:16)    at SyncBailHook.lazyCompileHook (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)    at Compilation.seal (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:1241:30)    at compilation.finish.err (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compiler.js:625:18)    at hooks.finishModules.callAsync.err (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:1171:4)    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:24:1)    at AsyncSeriesHook.lazyCompileHook (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\Hook.js:154:20)    at Compilation.finish (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:1163:28)    at hooks.make.callAsync.err (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compiler.js:622:17)    at _done (eval at create (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)    at _err1 (eval at create (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:32:22)    at _addModuleChain (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:1095:12)    at processModuleDependencies.err (C:\Users\wh\AppData\Roaming\npm\node_modules\webpack\lib\Compilation.js:1007:9)    at process._tickCallback (internal/process/next_tick.js:61:11)跟老师一起敲的代码,打包就出错了
查看完整描述
  • 2 回答
  • 0 关注
  • 1664 浏览

添加回答

举报

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