mzohaibqc / antd-theme-generator

This script is to generate color.less file to update color related css in browser.
https://mzohaibqc.github.io/antd-theme-generator/
358 stars 87 forks source link

ant design vue在新版本引用后提示自定义less解析错误问题 #101

Open atom-git opened 2 years ago

atom-git commented 2 years ago

Describe the bug ant design vue import antd-theme-generator@1.2.11 Error LessError: Cannot find module 'antd/lib/style/themes/default.less' from error message because of custom less compiler in line 352 image

please fix this problem and release a new version

vortesnail commented 2 years ago

Same problem happend!!!!

vortesnail commented 2 years ago

Code like this:

@import "~ant-design-vue/lib/style/themes/default.less";

Wrong:

Error LessError: Cannot find module 'antd/lib/style/themes/default.less' from 'xxxx'

Please help. Thanks

mzohaibqc commented 2 years ago

Any PRs are welcome.

On Wed, 23 Feb 2022, 8:48 am chen xin, @.***> wrote:

Code like this:

@import "~ant-design-vue/lib/style/themes/default.less";

Wrong:

Error LessError: Cannot find module 'antd/lib/style/themes/default.less' from 'xxxx'

Please help. Thanks

— Reply to this email directly, view it on GitHub https://github.com/mzohaibqc/antd-theme-generator/issues/101#issuecomment-1048425056, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIBRKYZORSTQRFZSPSVMITU4RKJ3ANCNFSM5LLL7AEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

no-simple commented 2 years ago

可以降低版本试试。

huangche007 commented 2 years ago

是的,使用ant3.x后,就会报错'Cannot find module \'antd/lib/style/themes/default.less\',各位大佬有解决方案没。 一些依赖如下: "vue": "^3.0.0", "ant-design-vue": "3.1.1", "antd-theme-generator": "^1.2.11",

huangche007 commented 2 years ago

我打开最新版1.2.11源码index.js362行fileContent = @import "~antd/lib/style/themes/default.less";\n@import"${varPath}";\n${fileContent}改成fileContent = @import "${varPath}";\n${fileContent};`就可以了