【问题标题】:File to import not found or unreadable with Jekyll and SassJekyll 和 Sass 找不到或无法读取要导入的文件
【发布时间】:2020-03-03 10:55:58
【问题描述】:

我正在尝试链接到我通过节点下载的 sass 库。

我得到的错误:

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/styles.scss':
   Error: File to import not found or unreadable: @library/path/src/index.scss. on line 3:1
   of @library/path/src/index.scss from line 3:1 of _sass/styles.scss from line 1:1
   of styles.scss >> @import '@library/path/src/index'; ^ 
                    ------------------------------------------------
      Jekyll 4.0.0   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 

我的 sass 文件如下所示:

@import '@library/path/src/index';

我添加到我的 package.json 文件中:

"sass": {
    "includePaths": ["./node_modules"]
}

图书馆给出的关于我缺少的东西的唯一提示是First, make sure your build system is configured so that the node_modules directory is in the list of Sass includePaths.我不确定在哪里可以确认。

注意:即使我直接链接到node_modules 中的文件,这也不起作用

../node_modules/@library/path/src/index.scss

【问题讨论】:

    标签: sass jekyll


    【解决方案1】:

    我想通了!

    我必须添加到我的 config.yml

      load_paths:
        - _sass
        - node_modules
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-13
      • 2019-08-08
      • 2014-09-19
      • 2018-05-05
      • 1970-01-01
      • 2015-08-03
      • 2014-06-15
      • 1970-01-01
      相关资源
      最近更新 更多