Colintao
Colintao
  • 发布:2020-08-04 14:30
  • 更新:2023-03-07 16:20
  • 阅读:5922

config.optimization.minimizer(...).tap is not a function

分类:uni-app

2.7.9升级到2.7.14之后生成自定义基座抛错;
TypeError: config.optimization.minimizer(...).tap is not a function
[HBuilder] 14:14:49.655 TypeError: config.optimization.minimizer(...).tap is not a function
[HBuilder] 14:14:49.662 at chainWebpack (E:\ZMN\CODE\saas-mini-2\node_modules\@dcloudio\uni-app-plus\lib\uni.config.js:57:47)
[HBuilder] 14:14:49.663 at E:\ZMN\CODE\saas-mini-2\node_modules\@dcloudio\vue-cli-plugin-uni\index.js:82:14
[HBuilder] 14:14:49.671 at E:\ZMN\CODE\saas-mini-2\node_modules\@vue\cli-service\lib\Service.js:242:40
[HBuilder] 14:14:49.671 at Array.forEach (<anonymous>)
[HBuilder] 14:14:49.681 at Service.resolveChainableWebpackConfig (E:\ZMN\CODE\saas-mini-2\node_modules\@vue\cli-service\lib\Service.js:242:26)
[HBuilder] 14:14:49.681 at PluginAPI.resolveChainableWebpackConfig (E:\ZMN\CODE\saas-mini-2\node_modules\@vue\cli-service\lib\PluginAPI.js:151:25)
[HBuilder] 14:14:49.689 at module.exports (E:\ZMN\CODE\saas-mini-2\node_modules\@vue\cli-service\lib\commands\build\resolveAppConfig.js:2:22)
[HBuilder] 14:14:49.689 at getWebpackConfig (E:\ZMN\CODE\saas-mini-2\node_modules\@dcloudio\vue-cli-plugin-uni\commands\build.js:53:88)
[HBuilder] 14:14:49.701 at getWebpackConfigs (E:\ZMN\CODE\saas-mini-2\node_modules\@dcloudio\vue-cli-plugin-uni\commands\build.js:89:32)
[HBuilder] 14:14:49.701 at build (E:\ZMN\CODE\saas-mini-2\node_modules\@dcloudio\vue-cli-plugin-uni\commands\build.js:119:26)
[HBuilder] 14:14:49.712 at E:\ZMN\CODE\saas-mini-2\node_modules\@dcloudio\vue-cli-plugin-uni\commands\build.js:44:11
[HBuilder] 14:14:49.713 at Service.run (E:\ZMN\CODE\saas-mini-2\node_modules\@vue\cli-service\lib\Service.js:236:12)
[HBuilder] 14:14:49.723 at Object.<anonymous> (E:\ZMN\CODE\saas-mini-2\node_modules\@vue\cli-service\bin\vue-cli-service.js:37:9)
[HBuilder] 14:14:49.724 at Module._compile (internal/modules/cjs/loader.js:936:30)
[HBuilder] 14:14:49.735 at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
[HBuilder] 14:14:49.736 at Module.load (internal/modules/cjs/loader.js:790:32)

2020-08-04 14:30 负责人:无 分享
已邀请:
z***@126.com

z***@126.com

我遇到了同样的问题,但是不是升级HbuilderX问题,我把@dcloudio版本回退到2.0.0-26920200409002就可以了

  • Colintao (作者)

    我也回滚了,但是老是提示 版本不一致

    2020-08-06 10:05

鄙人

鄙人 - 90后前端菜鸟

有解决办法了吗?我也遇到这个问题了

Colintao

Colintao (作者) - wanglin

我看到其他人说的这个方案,我这边可以了。
https://ask.dcloud.net.cn/question/103621?item_id=134849&rf=false

9***@qq.com

9***@qq.com

不知道什么原因,反正 在node_modules中找到 vue-cli-plugin-uni 包,把这行代码注释掉 就可以了 ,坑啊

要回复问题请先登录注册