【问题标题】:Foundation build error基础构建错误
【发布时间】:2017-05-27 13:24:50
【问题描述】:

Cannon 找了很长时间的解决方案。当我使用基础手表时,一切都很好,但每次我尝试使用基础构建时,我都会看到这个错误:

[21:05:45] 'sass' errored after 5.91 s
[21:05:45] Error in plugin 'gulp-uncss'
Message:
    Unexpected EOF
Details:
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false
[21:05:45] 'build' errored after 6.31 s
[21:05:45] 'default' errored after 6.31 s
Error: foundation-emails-template@1.0.0 build: `gulp --production`
Exit status 1
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:194:7)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

我还尝试删除文件夹 node_modules 并重新安装,但没有任何帮助。如何解决?

【问题讨论】:

    标签: gulp-uncss


    【解决方案1】:

    我过去曾经历过这种情况。我知道有两个已知问题会导致此类错误。

    1. 奇怪的空格,或 html 文件中的字符。通常来自其他地方的复制和粘贴命令。请参阅此问题以供参考:https://github.com/zurb/foundation-emails/issues/637

    2. 节点本身的过时版本。尝试更新您的节点版本,然后从您的项目中删除 node_modules 并在您的项目目录中运行 npm install

    【讨论】:

      【解决方案2】:

      为了进一步说明格兰特所说的,您可以在文本编辑器中搜索特殊字符,以便更容易发现它们。例如,如果您使用的是 Sublime Text 3,则可以使用以下正则表达式选择所有非 ASCII 字符:

      [^\x00-\x7F]
      

      单击“查找全部”(启用正则表达式搜索)将突出显示所有空格和特殊字符。

      参考:is there a way to highlight all the special accent characters in sublime text or any other text editor?

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-12-30
        • 2020-01-27
        • 1970-01-01
        • 2018-07-30
        • 1970-01-01
        • 1970-01-01
        • 2018-12-04
        • 2014-11-17
        相关资源
        最近更新 更多