我试图链接到通过节点下载的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
我想到了!
我必须添加到我的config.yml
load_paths:
- _sass
- node_modules
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句