-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Importing problem of ng-zorro-antd.less in scss files #8626
Comments
I had met the same issue, and the currently workaround is like this - @import "node_modules/ng-zorro-antd/ng-zorro-antd.less";
+ @import "../node_modules/ng-zorro-antd/ng-zorro-antd.less"; // use real relative path |
@Laffery Thank you, the issue has been resolved. |
I'm still facing this issue, even with @Laffery 's comment. Anyone got any other ideas? |
I'm also having the same issue. @Laffery's fix didn't worj. |
My solution was to remove all Basically, just avoiding less imports in my components resolved it. Not easy but better than not being able to build. |
Reproduction link
https://stackblitz.com/edit/ng-zorro-antd-ivy?file=src%2Fapp%2Fapp.component.ts
Steps to reproduce
When we import @import "node_modules/ng-zorro-antd/ng-zorro-antd.less";
We get an error in the terminal
I am using ng-zorro 18.0.1 and angular 18 with nx 19.4,
Error is: X [ERROR] Cannot find module 'node_modules\ng-zorro-antd\style\color\tinycolor2'
node_modules/ng-zorro-antd/style/color/tinyColor.js:1:19:
1 │ const tinycolor = require('./tinycolor2');
╵ ^
The plugin "angular-less" was triggered by this import
What is expected?
I expect it to run as same as ng-zorro 17
What is actually happening?
It won't compile project now
The text was updated successfully, but these errors were encountered: