Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: 升级[email protected][email protected]编译不通过,疑似less-loader版本太高,怎么解决? #1937

Closed
artdong opened this issue Oct 10, 2023 · 8 comments

Comments

@artdong
Copy link
Contributor

artdong commented Oct 10, 2023

Version

[email protected]

OS Version

Windows 10

Node.js Version

18.4.0

Browser Version

[email protected]

Link to minimal reproduction

https://gitee.com/ipr-fe/knk/tree/feat-dumi-v2.x

Steps to reproduce

yarn

yarn start

What is expected?

样式正常编译

What is actually happening?

Error evaluating function max: Operation on an invalid type
Error in E:\gitee\knk\node_modules\antd\es\form\style\index.less (line 87, column 19)
at Object. (E:\gitee\knk\node_modules@umijs\bundler-webpack\node_modules\css-loader\dist\cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!E:\gitee\knk\node_modules@umijs\bundler-webpack\compiled\postcss-loader\index.js??ruleSet[1].rules[5].oneOf[1].use[2]!E:\gitee\knk\node_modules@umijs\bundler-webpack\compiled\less-loader\index.js??ruleSet[1].rules[5].oneOf[1].use[3]!E:\gitee\knk\node_modules\antd\es\form\style\index.less:1:7)
at E:\gitee\knk\node_modules@umijs\bundler-webpack\compiled\webpack\index.js:131315:10
at Hook.eval [as call] (eval at create (E:\gitee\knk\node_modules@umijs\bundler-utils\compiled\tapable\index.js:1:7460), :7:1)

Any additional comments? (optional)

No response

@Wxh16144
Copy link
Member

这也太难搞了吧,不如先把组件库 antd 依赖升级上来(毕竟业务优先)其次再去倒腾文档。

但其实保持 antd3 + dumi1 也不是不可以。

@Wxh16144
Copy link
Member

我看了你提供的 gitee 仓库地址,给你提交了一个 PR 看看能不能解决你的问题 https://gitee.com/ipr-fe/knk/pulls/26

@yoyo837
Copy link

yoyo837 commented Oct 12, 2023

我也是antd@3, less-loader最新, 没啥问题呀, 只是没有用dumi.

@artdong
Copy link
Contributor Author

artdong commented Oct 12, 2023

我看了你提供的 gitee 仓库地址,给你提交了一个 PR 看看能不能解决你的问题 https://gitee.com/ipr-fe/knk/pulls/26

我试了你的办法,style: true 改成 style: 'css', 还是报一样的错。

@artdong
Copy link
Contributor Author

artdong commented Oct 12, 2023

我也是antd@3, less-loader最新, 没啥问题呀, 只是没有用dumi.

我这就是[email protected]生成文档报错

@artdong
Copy link
Contributor Author

artdong commented Oct 12, 2023

这也太难搞了吧,不如先把组件库 antd 依赖升级上来(毕竟业务优先)其次再去倒腾文档。

但其实保持 antd3 + dumi1 也不是不可以。

我只是想着试试dumi@2

@Wxh16144
Copy link
Member

我试了你的办法,style: true 改成 style: 'css', 还是报一样的错。

还要删除一个文件哈~

@artdong
Copy link
Contributor Author

artdong commented Oct 12, 2023

我试了你的办法,style: true 改成 style: 'css', 还是报一样的错。

还要删除一个文件哈~

赞一个👍,真的可以了。

@artdong artdong closed this as completed Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants