我正在尝试使用 Foundation scss 建立一个新网站,但每次我尝试 运行 sass 时都会出现此错误

I am trying to set up a new website with Foundation scss, although, every time i try running sass this error comes up

我正在尝试使用 Foundation scss 建立一个新网站,但是,每次我尝试 运行 sass 都会出现此错误

编译错误 错误:找不到文件“/Users/juri/lastHope/a/scss/util/util” 在 Users/juri/lastHope/a/scss/_settings.scss 的第 63 行 来自 sass/Users/juri/lastHope/a/scss/app.scss 的第 3 行 >> @import 'util/util';

这是一个已知问题。

您必须为 sass 编译器设置 includePaths,使用 ~foundation-sites/scss/util/util(如果您使用 webpack)或删除该行。

https://github.com/foundation/foundation-zurb-template/blob/4492303cfb6a05c60f74cb412247fa5f1e619ec8/gulpfile.babel.js#L96

    .pipe($.sass({
      includePaths: PATHS.sass
    })

https://github.com/foundation/foundation-zurb-template/blob/147c65c2690e8099ae93432459bfd1a57fcdbbbe/config.yml#L22-L24

  sass:
    - "node_modules/foundation-sites/scss"
    - "node_modules/motion-ui/src"

https://github.com/sass/node-sass#includepaths

includePaths Type: Array Default: [] An array of paths that LibSass can look in to attempt to resolve your @import declarations. When using data, it is recommended that you use this.