【问题标题】:SASS Compilation error when pushing to moovcloud?推送到moovcloud时SASS编译错误?
【发布时间】:2013-05-14 01:29:42
【问题描述】:

当我推送到 moovcloud 时,我收到此错误:

   | Compiling Sass assets...
   | gosass error: ~/assets/stylesheets/pages/accounts/address_book.scss:6: error: mixin border-radius is undefined
   | Backtrace:
   | e: ~/assets/stylesheets/pages/accounts/address_book.scss:6
   | gosass error: ~/assets/stylesheets/pages/accounts/login_details.scss:6: error: mixin border-radius is undefined
   | Backtrace:
   | e: ~/assets/stylesheets/pages/accounts/login_details.scss:6
   | gosass error: ~/assets/stylesheets/pages/accounts/login_page.scss:3: error: mixin display-label is undefined
   | Backtrace:
   | e: ~/assets/stylesheets/pages/accounts/login_page.scss:3
   | gosass error: ~/assets/stylesheets/pages/accounts/payment_info.scss:7: error: mixin display-label is undefined
   | Backtrace:
   | e: ~/assets/stylesheets/pages/accounts/payment_info.scss:7
   | gosass error: ~/assets/stylesheets/pages/customer/locate_store.scss:5: error: reference to unbound variable $gray4
   | Backtrace:
   | e: ~/assets/stylesheets/pages/customer/locate_store.scss:5
   | gosass error: ~/assets/stylesheets/pages/subpages.scss:9: error: mixin account-link-button is undefined
   | Backtrace:
   | e: ~/assets/stylesheets/pages/subpages.scss:9

知道什么可能导致这种情况或原因吗?我的 git 工作目录很干净,所以所有文件都已启动。我的 mlocal 工作正常,没有错误。我有点困惑。任何帮助将非常感激。

【问题讨论】:

    标签: sass moovweb


    【解决方案1】:

    您尝试使用的 mixin 似乎不可用。

    它们是否存在于您的 scss 文件中?您确定将所有内容都导入 main.scss 吗?

    尝试在您的样式表中搜索这些mixin,以找出它们可能在哪里定义。如果你找不到它们,它们就不存在。

    可能本地的东西看起来可以正常工作,但生成的样式表可能包含错误。

    【讨论】:

    • 只是为了仔细检查它在本地工作,我会在隐身模式下打开页面。您可能还想删除 assets/stylesheets/.css 文件夹中的本地 CSS 缓存。
    • 不幸的是,这些都不是问题。问题是locate_store.scss 没有以“_”开头。对于 libsass,所有导入的文件都必须以“_”开头
    【解决方案2】:

    问题只是列出的文件没有以“_”开头。如果您遇到此错误,请确保所有导入的文件都以“_”开头。

    【讨论】:

      猜你喜欢
      • 2020-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-09
      • 2021-08-26
      • 2016-10-15
      • 1970-01-01
      • 2019-04-29
      相关资源
      最近更新 更多