【问题标题】:Docpad error after Sass installSass 安装后的 Docpad 错误
【发布时间】:2013-05-27 05:15:27
【问题描述】:

我想开始使用基础 4。所以我安装了 Ruby 和 Sass。

安装 Sass gem 后,我在 docpad generate 上收到以下错误消息:

error: An error occured:
Error: spawn ENOENT
    at errnoException (child_process.js:948:11)
    at Process.ChildProcess._handle.onexit (child_process.js:739:34)
    → [2013-05-31 13:23:20.812] [C:\Users\USERDIR\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log]
error: An error occured:
Error: spawn ENOENT
    at errnoException (child_process.js:948:11)
    at Process.ChildProcess._handle.onexit (child_process.js:739:34)
    → [2013-05-31 13:23:20.820] [C:\Users\USERDIR\AppData\Roaming\npm\node_modules\docpad\out\lib\docpad.js] [DocPad.log]

我想使用 sass 在 docpad 中生成基础。 我尝试使用这个基础 docpad 骨架:https://github.com/axyz/zurb-foundation.docpad

这是什么原因造成的,我该如何解决?

【问题讨论】:

    标签: ruby node.js sass docpad


    【解决方案1】:

    这可能与这个问题相同 - https://github.com/docpad/docpad-plugin-sass/issues/6 - DocPad 无法自动检测您的 sass 安装路径,因此您必须通过将以下内容添加到您的 docpad configuration file 来手动指定它

    plugins:
        sass:
            sassPath: 'theValue'
            scssPath: 'theValue'
            compass: 'theValue'
    

    【讨论】:

      【解决方案2】:

      一个有点老的问题,但是我刚刚更新了https://github.com/axyz/zurb-foundation.docpad 以支持foundation v4.3.2,现在它似乎运行良好。

      但是我不得不从纯 sass 切换到 nodeass 实现(手动更新基础源,也许可以切换到 git 子模块)。我不得不切换不仅是出于性能原因,还因为我在使用 sass 插件时遇到了问题:只要有一些文件需要解析,例如 example.css.scss,它就会在 docpad run 期间卡住

      【讨论】:

      • 只是要补充一点:现在我已经更新了基础 5 的骨架,并且感谢 zurb 切换到凉亭,现在更新应该像凉亭更新一样容易。所以使用nodesass没有更多的缺点了。
      猜你喜欢
      • 2018-04-27
      • 1970-01-01
      • 2017-04-18
      • 2015-02-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-05
      • 2014-05-21
      • 1970-01-01
      相关资源
      最近更新 更多