Vercel CLI 构建 Jekyll 时报错”Error: spawn bundle ENOENT“ 无法部署

还是刚刚开始 Running "vercel build" 就报错 Error: spawn bundle ENOENT,遇到这种情况如何处理?(具体报错日志见下文)

一般情况,刚开始部署就报错,大概率是环境配置问题,修改配置即可。可能是因为之前别的错误,做尝试将 Node.js 改成了20.x,vercel 上的 Node.js 20 本身就是测试版(Node.js 20.x is in beta. ),有问题也能理解。

可以按下面操作步骤修改 Node.js 版本。

修改 Vercel Node.js 配置 解决 Error: spawn bundle ENOENT 错误操作步骤

修改 Vercel Node.js 配置

截图所示为第3、4、5、6、7步骤

  1. 打开你的 Vercel 并登录
  2. 打开你对应的项目
  3. 选择顶部菜单中的「Settings」(设置)
  4. 选择做成菜单中的「General」(常规)
  5. 找到「Node.js Version」
  6. 选择「18.x」
  7. 点击「Save」(保存)
  8. 保存后会自动重新构建最近一次提交的代码

报错提示

[10:12:14.461] Running build in Washington, D.C., USA (East) – iad1
[10:12:14.564] Cloning gitlab.com/note43/prompts (Branch: main, Commit: c834ba8)
[10:12:14.899] Previous build cache not available
[10:12:15.667] Cloning completed: 1.102s
[10:12:15.943] Running "vercel build"
[10:12:16.427] Vercel CLI 33.5.2
[10:12:17.041] Installing dependencies...
[10:12:17.046] Error: spawn bundle ENOENT
[10:12:17.333] 

Relay Tips: 一极乐https://yijile.com/log/323/