Hugo 启动器的 Netlify 部署失败并出现 "spawn EACCES" 错误

Netlify deploy for Hugo starter fails with "spawn EACCES" error

我已经使用 Netlify CMS Hugo Site Starter 建立了一个站点并且运行良好。
然后我从创建的存储库中取出文件并将它们移动到一个新的 Git 存储库,并基于该存储库创建一个新的 Netlify 站点。 突然部署在尝试启动 Hugo 时给我一个错误:

10:03:37 PM: Starting 'hugo'...
10:03:37 PM: [21:03:37]
10:03:37 PM: 'hugo' errored after 14 ms
10:03:37 PM: [21:03:37]
10:03:37 PM: Error: spawn EACCES
10:03:37 PM:     at ChildProcess.spawn (internal/child_process.js:313:11)
10:03:37 PM:     at Object.exports.spawn (child_process.js:508:9)
10:03:37 PM:     at buildSite (/opt/build/repo/gulpfile.babel.js:81:13)
10:03:37 PM:     at Gulp.<anonymous> (/opt/build/repo/gulpfile.babel.js:23:27)
10:03:37 PM:     at module.exports (/opt/build/repo/node_modules/orchestrator/lib/runTask.js:34:7)
10:03:37 PM:     at Gulp.Orchestrator._runTask (/opt/build/repo/node_modules/orchestrator/index.js:273:3)
10:03:37 PM:     at Gulp.Orchestrator._runStep (/opt/build/repo/node_modules/orchestrator/index.js:214:10)
10:03:37 PM:     at Gulp.Orchestrator.start (/opt/build/repo/node_modules/orchestrator/index.js:134:8)
10:03:37 PM:     at /opt/build/repo/node_modules/gulp/bin/gulp.js:129:20
10:03:37 PM:     at _combinedTickCallback (internal/process/next_tick.js:132:7)

我似乎无法在 Netlify 部署上下文中找到任何关于 "spawn EACCES" 错误的信息。
任何人有任何想法或者以前可能遇到过这个问题?

编辑: 澄清一点:
当我克隆原始 Hugo Site Starter Git 存储库并使用它进行部署时,一切正常。
当我创建一个新的 Git 存储库时,提交+推送与克隆的存储库完全相同的内容并尝试将其部署为站点,Netlify returns spawn EACCES 错误。 我做了一个 Winmerge 来查找更改,唯一的更改是在 .git 文件夹中,因为我创建了一个新的存储库(因此它只有一个提交而不是 200+);代码是 100% 相同的。

从您的存储库中删除 bin 文件夹并

它将允许您在升级本地 Hugo 版本时更改 Hugo 版本。有理由将 Hugo 保存在 bin 文件夹中,因为它的占用空间很小,但是当托管在 Netlify 上时,我认为没有任何理由这样做。我试图跟踪该 bin 文件夹中的版本以及您遇到的问题的缺点增加了我不在存储库中保留可执行版本的原因。

您将需要 运行 全局本地版本的 Hugo 以进行开发,但您可以按照 Hugo 文档了解如何执行此操作。