把taro3.4升级到taro3.5报编译错误:Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/dist/CssModule/null is already registered

w7t8yxp5  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(43)

相关平台

微信小程序

小程序基础库: 2.5.2
使用框架: React

复现步骤

我按照Taro官方网站的升级指南: https://docs.taro.zone/blog/2022/07/26/Taro-3.5,把目前的taro3.4版本的项目升级到taro3.5,完成依赖安装和相关升级配置后,执行yarn run dev:weapp报错

期望结果

编译成功,不报mini-css-extract-plugin的相关错误

实际结果

具体报错信息:
node_modules\webpack\lib\serialization\ObjectMiddleware.js:193
throw new Error(
^
Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/dist/CssModule/null is already registered

环境信息

Taro v3.5.12
  Taro CLI 3.5.12 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 16.19.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - D:\softup\nodejs\node_global\yarn.CMD
      npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
    "@tarojs/cli": "3.5.12",
    "@tarojs/components": "3.5.12",
    "@tarojs/plugin-framework-react": "3.5.12",
    "@tarojs/react": "3.5.12",
    "@tarojs/runtime": "3.5.12",
    "@tarojs/taro": "3.5.12",
    "@tarojs/webpack5-runner": "3.5.12",

相关问题