【发布时间】:2020-12-16 19:15:04
【问题描述】:
我正在为我的投资组合网站使用 React 简历模板。 当我使用 react-script 1.x 时,一切正常。
昨天我更新了我的网站以使用 three.js 动画,但在尝试部署该网站时,我遇到了缩小失败失败的错误。我更新为“react-scripts”:“3.4.1”
更新 react-scripts 后,安装 node-sass 时出错,我安装了。
现在我有一个 sass 变量错误。
SassError: Undefined variable: "$fa-css-prefix".
on line 3 of /home/tom/Desktop/lighthouse/react-resume-template/public/css/font-awesome/scss/_fixed-width.scss
>> .#{$fa-css-prefix}-fw {
我基本上对 sass 和 css 变量一无所知......以及导入这些东西。除了主要的 font-awesome.scss 之外,我实际上没有看到任何导入语句,所以我有点迷路了。
font-awesome.scss
@import "variables";
@import "mixins";
@import "path";
@import "core";
@import "larger";
@import "fixed-width";
@import "list";
@import "bordered-pulled";
@import "spinning";
@import "rotated-flipped";
@import "stacked";
@import "icons";
_fixed-width.scss
.#{$fa-css-prefix}-fw {
width: (18em / 14);
text-align: center;
}
【问题讨论】:
标签: reactjs sass font-awesome react-scripts