[Q&A] Vercel部署过程出现 Cannot find module '/vercel/path0/install.js'
错误
#967
-
💻 系统环境 | Operating SystemOther 🌐 浏览器 | BrowserChrome 🐛 问题描述 | Bug Description在Vercel部署时发生错误
🚦 期望结果 | Expected Behavior期望部署成功 📷 复现步骤 | Recurrence Steps使用的是文档推荐的方式, 通过GitHub Action自动同步repo, Vercel自动部署更新 📝 补充信息 | Additional Information可能和 #994 是类似的问题 |
Beta Was this translation helpful? Give feedback.
Replies: 30 comments
-
👀 @lainbo Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
最新版的Vercel部署失败了n次 |
Beta Was this translation helpful? Give feedback.
-
The latest version of Vercel deployment failed n times |
Beta Was this translation helpful? Give feedback.
-
same error |
Beta Was this translation helpful? Give feedback.
-
yes,me too |
Beta Was this translation helpful? Give feedback.
-
感觉像是 bun 的依赖问题?刚试了下好像是正常的呀: |
Beta Was this translation helpful? Give feedback.
-
Yes,me too |
Beta Was this translation helpful? Give feedback.
-
需要先安装依赖吗?请教怎么安装啊? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@szdbin 就是 redeploy 一下? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@lainbo 试试 install command 改成 https://github.com/lobehub/lobe-chat/blob/main/vercel.json#L2 |
Beta Was this translation helpful? Give feedback.
-
在将Project Settings - General - Install Command修改为
我为了防止出现其他问题, 删除并重新fork了repo, 删除并重新创建了Vercel中的project, 没有对项目进行任何修改 |
Beta Was this translation helpful? Give feedback.
-
我很怀疑是 vercel 平台的问题… 毕竟早上还是正常的。我先去提一个 issue 问下 |
Beta Was this translation helpful? Give feedback.
-
I highly doubt it is a problem with the vercel platform... After all, it was still normal in the morning. Let me raise an issue first. |
Beta Was this translation helpful? Give feedback.
-
OK, thank you. I also think it's a little strange, because the first commit with the problem only made changes to the document |
Beta Was this translation helpful? Give feedback.
-
我试了下,我们官方的 preview 构建也失败了,是同样的报错: 但主仓库所用的构建却是正常的: 而 preview 和 主仓库的区别,只是 preview 是主仓库的一个 fork,然后大家遇到报错的应该也是 fork 版本。 所以个人感觉大概率是 vercel 平台的构建问题。我已经提交工单给 vercel 了,等他们的回复吧。 |
Beta Was this translation helpful? Give feedback.
-
@szdbin @lainbo 有个临时解决方案目前我测试下来似乎可行,就是将 Node Version 提到 20,然后重新 redeploy ,如果着急的话可以试试看。 是否将 LobeChat 项目默认 Node 版本改成到 20 ,我还要再观察下。 |
Beta Was this translation helpful? Give feedback.
-
好的, 非常感谢 |
Beta Was this translation helpful? Give feedback.
-
alright, thank you very much |
Beta Was this translation helpful? Give feedback.
-
yes, here too |
Beta Was this translation helpful? Give feedback.
-
@UGGKA @HansSongBin Please try to set the Node Version to 20, and it seem to work. |
Beta Was this translation helpful? Give feedback.
-
Temporary solution is to downgrade to bun@1.0.15 npx bun@1.0.15 install |
Beta Was this translation helpful? Give feedback.
-
目前排查下来应该是 Vercel 升级 bun 版本所致。如果使用 {
"installCommand": "npx bun@1.0.15 install"
} |
Beta Was this translation helpful? Give feedback.
-
The current investigation seems to be caused by Vercel upgrading the bun version. If you use |
Beta Was this translation helpful? Give feedback.
-
✅ @lainbo This issue is closed, If you have any questions, you can comment and reply. |
Beta Was this translation helpful? Give feedback.
-
🎉 This issue has been resolved in version 0.119.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Beta Was this translation helpful? Give feedback.
-
完美解决!非常感谢,真好🙏 |
Beta Was this translation helpful? Give feedback.
-
Perfect solution! Thank you very much, it’s great 🙏 |
Beta Was this translation helpful? Give feedback.
目前排查下来应该是 Vercel 升级 bun 版本所致。如果使用
bun@1.0.21
进行安装就会报错,已经找到临时解决方案。修改vercel.json
配置,使用bun@1.0.15
进行安装。 修复pr: #960