找不到要导入的样式表

问题描述 投票:0回答:1

我正在使用 bootstrap 和 sass。 Nodejs 与 grunt。

app.sss

$icon-font-path: "/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/";
$fa-font-path: "/bower_components/font-awesome/fonts";
$header-height: 50px;

@import 'bootstrap-sass-official/vendor/assets/stylesheets/bootstrap';
@import 'font-awesome/scss/font-awesome';
...
...
...

错误:

Error: Can't find stylesheet to import.
      ╷
    4 │ @import 'bootstrap-sass-official/vendor/assets/stylesheets/bootstrap'

我尝试过使用

~ no $icon-font-path
,尝试放置相对路径,但没有成功。

有什么建议吗?谢谢。

sass bootstrap-4
1个回答
0
投票

所以可能会有多个错误:

  1. 样式表的路径是否正确?
  2. 文件名正确吗?
  3. 是否必须在路径前添加“/”,如“/bootstrap-sass-official/...”?

尝试一下并寻找结果:)

© www.soinside.com 2019 - 2024. All rights reserved.