Webpack 4:目标:NodeJS。模式:生产; MySQL错误:以错误的顺序接收数据包

时间:2018-03-19 09:31:11

标签: webpack webpack-4

刚刚升级到Webpack 4并在使用mode:'production'构建服务器端代码时。我得到了这个MySQL Error: Received packet in the wrong sequence.

你怎么能阻止这种破坏呢?

1 个答案:

答案 0 :(得分:1)

与Web Pack捆绑在一起时,我遇到了同样的问题。终于我解决了这个问题。 我认为这是与Web Pack和babel-loader版本不匹配有关的问题。 我建议在package.json中进行以下组合 “ babel-core”:“ ^ 6.26.0”, “ babel-loader”:“ ^ 7.1.2”, “ babel-plugin-transform-runtime”:“ ^ 6.23.0”, “ babel-preset-es2015”:“ ^ 6.24.1”, “ babel-preset-stage-3”:“ ^ 6.24.1”, “ mysql”:“ ^ 2.15.0”, “ serverless-webpack”:“ ^ 2.2.3”, “ webpack”:“ ^ 3.5.5”