【问题标题】:ERROR Plugin load failed: hexo-deployer-git when I deploy the blog错误插件加载失败:我部署博客时的 hexo-deployer-git
【发布时间】:2019-09-13 01:57:27
【问题描述】:

git、node、hexo都安装正确。但是我安装hexo-deployer-git的时候,所有的hexo命令都会出现如下问题。这是插件的问题吗?我该如何解决? 以下是错误信息,您能帮帮我吗?

        '''
$ hexo d
ERROR Plugin load failed: hexo-deployer-git
D:\blog\node_modules\picomatch\lib\picomatch.js:54
    let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
                       ^^^
SyntaxError: Unexpected token ...
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\blog\node_modules\picomatch\index.js:3:18)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\blog\node_modules\hexo-deployer-git\node_modules\readdirp\index.js:6:19)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
ERROR Deployer not found: git
        '''

【问题讨论】:

    标签: node.js github hexo


    【解决方案1】:

    您可能正在运行不支持该语法的旧版本 Node。 SyntaxError 是由扩展运算符 ... 引起的,Node 8.3 或更高版本支持该运算符。

    要检查您的 Node 版本,请在终端窗口中运行 node -v。

    【讨论】:

    • 谢谢。问题已解决。你是对的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-21
    • 1970-01-01
    • 1970-01-01
    • 2023-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多