使用Ant Design的纱线构建失败

问题描述 投票:0回答:1

我打算重新部署一个Web应用程序,所以我试图运行yarn build,它遇到了这个错误。

我正在使用Ant Design,之前我也进行过纱线弹出,通过Google搜索后仍然没有运气,之前遇到过任何错误吗?有解决问题的技巧吗?谢谢!

yarn run v1.22.0
$ react-app-rewired build
Creating an optimized production build...
Failed to compile.

./node_modules/antd/es/style/index.less
TypeError: this[MODULE_TYPE] is not a function


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
reactjs yarn create-react-app antd
1个回答
0
投票

即使我也遇到了同样的问题。我的问题是我与Ant Design版本混在一起。 Ant v4.x是最近发布的,因此我使用了组件而不检查版本。因此,尝试使用相同版本的组件,看看是否可行!!

© www.soinside.com 2019 - 2024. All rights reserved.