我试图链接到通过节点下载的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
答案 0 :(得分:0)
我知道了!
我必须添加到我的config.yml
load_paths:
- _sass
- node_modules