0

运行 yarn 会报错,构建会失败。''build' error' 由于语法错误而发生?我是 gulp 的新手,所以我不知道在哪里编辑。

[19:27:29] Starting 'css'...
[19:27:30] 'css' errored after 887 ms
[19:27:30] CssSyntaxError in plugin 'gulp-cssnext'
Message:
    /var/www/vhosts/dev.〇〇.co.jp/wp-content/themes/src/css/trunk-all.css:1:60846: Unknown word
Details:
    reason: Unknown word   

  //Omitted

    line: 1
    column: 60846
    generated: [object Object]
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false
[19:27:30] 'build' errored after 1.3 s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

以下信息是否足以解释问题?

node -v
v8.16.0

gulp -v
CLI version: 2.3.0
Local version: 4.0.2

npm -v
6.14.13

这是 css.js

import path from "./_path.json";

export default {
    "src" : path.src + "/css/**/*.scss",
    "dest" : path.build_root + "/css",
    "sass" : {
        "outputStyle" : "compressed"
    },
    "cssnext" : {
        "browsers" : ["last 3 versions"]
    }
};

这是 gulpfile.babel.js

import requireDir from 'require-dir';

/*------------------------------------------------------------------
    tools
------------------------------------------------------------------*/
requireDir('./gulp/tools', { recurse : true });

/*------------------------------------------------------------------
    tasks
------------------------------------------------------------------*/
requireDir('./gulp/tasks', { recurse : true });

/*------------------------------------------------------------------
    build
------------------------------------------------------------------*/
require('./gulp/build');
require('./gulp/default');
4

0 回答 0