[英]getting "Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Invalid CSS after " in angular ag-grid
I'm getting following error after even with node-sass, sass or without both of them.即使使用 node-sass、sass 或两者都没有,我也会收到以下错误。 But i remove node modules and node cache clean, I'm still getting this error.但是我删除了节点模块并清除了节点缓存,但我仍然收到此错误。 I tried adding node-sass and sass versions also.我也尝试添加 node-sass 和 sass 版本。 but still this error keep coming.但这个错误仍然不断出现。 this was happened after I upgrade my ag-grid version to 27.3 from 23.4.这是在我将 ag-grid 版本从 23.4 升级到 27.3 后发生的。
ERROR in ./src/styles.scss (./node_modules/css-loader/dist/cjs.js??ref--13-1!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/dist/cjs.js??ref--13-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after " @return math": expected expression (e.g. 1px, bold), was ".div($lhs, $rhs);"
on line 315 of node_modules/ag-grid-community/src/styles/mixins/_ag-theme-params.scss
from line 1 of node_modules/ag-grid-community/src/styles/ag-theme-base/sass/_ag-theme-base-default-params.scss
from line 1 of node_modules/ag-grid-community/src/styles/ag-theme-base/sass/_ag-theme-base-mixin.scss
from line 1 of node_modules/ag-grid-community/src/styles/ag-theme-base/sass/_ag-theme-base.scss
from line 1 of node_modules/ag-grid-community/src/styles/ag-theme-alpine/sass/_ag-theme-alpine-mixin.scss
from line 2 of D:\Projects\Operative\Repo\ag-grid-update\finance\finance-frontend\src\styles.scss
>> @return math.div($lhs, $rhs);
----------------^
need a help because I tried so many posted answers in SO.需要帮助,因为我在 SO 中尝试了很多已发布的答案。
As of Version 26 of AG Grid, Node-Sass will no longer work with AG Grid.从 AG Grid 的第 26 版开始,Node-Sass 将不再与 AG Grid 一起使用。
This is due to Node-Sass being deprecated in favor of Dart-Sass, you can find out more about this here .这是由于 Node-Sass 被弃用,取而代之的是 Dart-Sass,您可以在此处找到更多相关信息。
For users upgrading from versions of AG Grid before 26 or new users, we would highly recommend using Sass .对于从 AG Grid 26 之前版本升级的用户或新用户,我们强烈建议使用Sass 。
For more information regarding AG Grid and Sass and how themes and styles work, please visit our documentation .有关 AG Grid 和 Sass 以及主题和 styles 工作原理的更多信息,请访问我们的文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.