NetLify CMS - 由于缺少./bin/hugo.win32文件导致的gulpe服务器错误

时间:2017-03-24 18:35:22

标签: gulp netlify

我正在为一个项目测试NetLify CMS,但是我无法在我的本地环境中工作,因为gulp服务器在启动之前崩溃,原因是下面的错误:

$ npm start

> victor-hugo@1.0.0 start C:\Users\maufa\Documents\web-development\kaldi-hugo-cms-template
> gulp server

[14:17:07] Requiring external module babel-register
[14:17:08] Using gulpfile ~\Documents\web-development\kaldi-hugo-cms-template\gulpfile.babel.js
[14:17:08] Starting 'hugo'...
[14:17:08] Starting 'css'...
[14:17:09] Starting 'js'...
[14:17:09] Starting 'svg'...
[14:17:09] Starting 'cms'...
[14:17:09] Finished 'cms' after 150 ms
events.js:160
  throw er; // Unhandled 'error' event
  ^

Error: spawn ./bin/hugo.win32 ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! victor-hugo@1.0.0 start: `gulp server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the victor-hugo@1.0.0 start script 'gulp server'.

所以,看起来它正试图在bin文件夹中找到hugo.win32。 但是,在这个文件夹里面我是:

  • hugo.darwin
  • hugo.exe
  • hugo.linux

有任何线索吗?

1 个答案:

答案 0 :(得分:5)

Kaldi Hugo template看起来这个问题是特别的。我在Windows上安装并得到了同样的错误,然后我尝试将hugo.exe重命名为hugo.win32,并且它有效。我在gulpfile.babel.js中找到了错误(Windows的字符串标识符不正确),并提交了PR。如果您不想等待合并,请随时直接更改您的版本:https://github.com/netlify-templates/kaldi-hugo-cms-template/pull/3/files