Gulp 任务错误:'glyf 中的校验和错误' [英] Gulp Task Error: 'Checksum error in glyf'

查看:24
本文介绍了Gulp 任务错误:'glyf 中的校验和错误'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 Gulp 任务,但我收到一个错误,我不知道如何修复甚至调试.Gulp 文件和任务是由 NetSuite 创建的,我没有编辑过(它们应该可以开箱即用).

I am attempting to run a Gulp task and I get an error that I have no idea how to fix or even debug. The Gulp file and tasks have been created by NetSuite and haven't been editted by myself (they should work out of the box).

知道什么节点包可能导致以下错误以及如何修复错误吗?也许我需要使用不同版本的 SASS 或 Font-Awesome?

Any idea what node package could be causing the following error and how I can fix the error? Maybe I need to use a different version of SASS or Font-Awesome?

C:UsersMyUserSuiteCommerce Advanced Mont Blanc>gulp local   
[08:48:45] Warning: gulp version mismatch:   
[08:48:45] Global gulp is 3.9.1   
[08:48:45] Local gulp is 3.8.7   
[08:48:53] Using gulpfile ~SuiteCommerce Advanced Mont Blancgulpfile.js   
(node:1372) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'   
[08:48:53] Starting 'local-install'...   
[08:48:53] Finished 'local-install' after 79 μs   
[08:48:53] Starting 'templates'...   
[08:48:53] Starting 'macros-jst'...   
[08:48:53] Finished 'macros-jst' after 242 μs   
[08:48:53] Starting 'macros'...   
[08:48:53] Starting 'javascript-entrypoints'...   
[08:48:53] Finished 'javascript-entrypoints' after 13 ms   
[08:48:53] Starting 'javascript-move'...   
[08:48:53] Starting 'copy'...   
[08:48:53] Starting 'less'...   
[08:48:53] Finished 'less' after 364 μs   
[08:48:53] Starting 'sass-prepare'...   
[08:48:53] Starting 'languages'...   
[08:48:53] Starting 'images'...   
[08:48:53] Starting 'fonts'...   
[08:48:53] Finished 'fonts' after 386 μs   
[08:48:53] Starting 'watch-templates'...   
[08:48:53] Finished 'watch-templates' after 335 ms   
[08:48:53] Starting 'watch-macros'...   
[08:48:53] Finished 'watch-macros' after 610 μs   
[08:48:53] Starting 'watch-javascript'...   
[08:48:54] Finished 'watch-javascript' after 580 ms   
[08:48:54] Starting 'watch-less'...   
[08:48:54] Finished 'watch-less' after 459 μs   
[08:48:54] Starting 'watch-sass'...   
[08:48:55] Finished 'watch-sass' after 1.5 s   
[08:48:55] Starting 'watch-languages'...   
[08:48:55] Finished 'watch-languages' after 88 ms   
[08:48:55] Starting 'watch-fonts'...   
[08:48:56] Finished 'watch-fonts' after 365 μs   
[08:48:56] Starting 'watch-images'...   
[08:48:56] Finished 'watch-images' after 41 ms   
[08:48:56] Finished 'copy' after 2.63 s   
[08:48:56] Finished 'macros' after 2.71 s   
[08:48:57] Finished 'javascript-move' after 4.15 s   
[08:49:02] Finished 'images' after 9.11 s   
[08:49:06] Finished 'languages' after 13 s   
[08:49:07] Finished 'templates' after 14 s   
[08:49:07] Starting 'javascript'...   
[08:49:12] Finished 'sass-prepare' after 19 s   
[08:49:12] Starting 'generate-sass-index'...   
[08:49:12] Finished 'generate-sass-index' after 118 ms   
[08:49:12] Starting 'sass'...   
[08:49:12] Finished 'javascript' after 4.99 s   
[08:49:12] Starting 'clean-templates'...   
[08:49:12] Finished 'clean-templates' after 12 μs   
[08:49:13] SOURCE CODE ERROR   
[08:49:13] status 1   
[08:49:13] file C:/Users/MyUser/SuiteCommerce Advanced Mont Blanc/LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss   
[08:49:13] line 11   
[08:49:13] column 245   
[08:49:13] message LocalDistributionsass	witter-bootstrap-sassmixins\_grid-framework.scss   
Error: You may not @extend an outer selector from within @media.   
       You may only @extend selectors within the same directive.   
       From "@extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss   
        on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss   
>>   
[08:49:13] formatted Error: You may not @extend an outer selector from within @media.   
       You may only @extend selectors within the same directive.   
       From "@extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss   
        on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss   
>>   
[08:49:13] messageFormatted LocalDistributionsass	witter-bootstrap-sassmixins\_grid-framework.scss   
Error: You may not @extend an outer selector from within @media.   
       You may only @extend selectors within the same directive.   
       From "@extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss   
        on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss   
>>   
[08:49:13] name Error   
[08:49:13] stack Error: LocalDistributionsass	witter-bootstrap-sassmixins\_grid-framework.scss   
Error: You may not @extend an outer selector from within @media.   
       You may only @extend selectors within the same directive.   
       From "@extend .col-md-6" on line 134 of LocalDistribution/sass/ItemDetails/_item-details.scss   
        on line 11 of LocalDistribution/sass/twitter-bootstrap-sass/mixins/_grid-framework.scss   
>>   
    at options.error (C:UsersMyUserSuiteCommerce Advanced Mont Blanc
ode_modules
ode-sasslibindex.js:286:26)   
[08:49:13] showStack false   
[08:49:13] showProperties true   
[08:49:13] plugin gulp-sass   
[08:49:13] Finished 'sass' after 954 ms   
[08:49:13] Starting 'font-awesome'...   
[08:49:13] Starting 'clean-sass-tmp'...   
[08:49:13] Finished 'clean-sass-tmp' after 5.57 μs   

events.js:160   
      throw er; // Unhandled 'error' event   
      ^   
Error: Checksum error in glyf   

推荐答案

看起来你已经安装了 node > v4.

It looks like you have node > v4 installed.

如果您在更新节点后还没有运行 npm install,您需要这样做,以便 SASS 获取一个新的可执行文件.运行 npm install 可能会解决您的问题然后 gulp clean 和 gulp local.

If you haven't run npm install since updating node you'll need to do that so SASS get's a new executable. Running npm install may fix your issue then gulp clean and gulp local.

由于我经常在运行 gulp local 时看到错误,因此我通常将这些作为单个命令运行:

Due to how often I see errors just running gulp local I generally run these as a single command:

gulp clean && gulp local

不过,我也会检查并修复 Netsuite 的 SASS 文件中的所有这些问题.几乎所有这些都是由于规格过高造成的,我还没有看到修复它们引起的任何问题.

However I also go through and fix all those issues in the Netsuite's SASS files. Almost all of them are due to overspecification and I haven't seen any issues caused by fixing them.

例如来自 NS

.item-details-main {
    @media (min-width: $screen-md-min) {
        @extend .col-md-4;
    }
}

行为与以下内容几乎相同:

behaves pretty much the same as:

.item-details-main {
    @extend .col-md-4;
}

这篇关于Gulp 任务错误:'glyf 中的校验和错误'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆