Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
自举';s SCSS无法编译-始终获取`单位($number)`必须是一个数字';错误_Css_Twitter Bootstrap_Sass_Gulp - Fatal编程技术网

自举';s SCSS无法编译-始终获取`单位($number)`必须是一个数字';错误

自举';s SCSS无法编译-始终获取`单位($number)`必须是一个数字';错误,css,twitter-bootstrap,sass,gulp,Css,Twitter Bootstrap,Sass,Gulp,我想在我的项目中本地使用Bootstaps网格 我正在狼吞虎咽地编写SCS。我可以确认这工作很好-我能够编译我自己的scss文件 但是,当我添加任何Bootstrap.scss文件时,会出现以下错误: assets\scss\bootstrap\u scss\u functions.scss错误:参数$number of单位($number)必须是一个数字 这在引导程序4.5.3和5.0 Alpha中都会发生 我的app.scss文件如下所示: @import 'bootstrap_scss/_

我想在我的项目中本地使用Bootstaps网格

我正在狼吞虎咽地编写SCS。我可以确认这工作很好-我能够编译我自己的scss文件

但是,当我添加任何Bootstrap.scss文件时,会出现以下错误:

assets\scss\bootstrap\u scss\u functions.scss错误:参数
$number
of
单位($number)
必须是一个数字

这在引导程序4.5.3和5.0 Alpha中都会发生

我的app.scss文件如下所示:

@import 'bootstrap_scss/_functions';
@import 'bootstrap_scss/_variables';
@import 'bootstrap_scss/_mixins';

@import 'bootstrap_scss/bootstrap-reboot';
@import 'bootstrap_scss/bootstrap-grid';
我也尝试过NPM版本的Bootstrap,但得到了相同的结果


有人知道我应该做什么吗?

查看的源代码看起来您正在覆盖
$container max widths
和/或
$grid breakpoints
变量

确保两个变量都具有映射中的数值。默认值为:

$grid-breakpoints: (
  xs: 0,
  sm: 576px,
  md: 768px,
  lg: 992px,
  xl: 1200px
) !default;

$container-max-widths: (
  sm: 540px,
  md: 720px,
  lg: 960px,
  xl: 1140px
) !default;

Bootstrap 4.5.3没有定义任何
$number
变量(不确定其他版本),因此它必须是您的自定义变量。我不知道你的
引导程序如何运行。scss
看起来像是什么,但可以肯定的是,你是否真的定义了
$number
?@Fahmi不,我还没有定义。查看文件时,如果$prev num==null或unit($num)=“%”或unit($prev num)==“%”,则错误的行是