提问人:Jamal Makame 提问时间:9/2/2023 更新时间:9/2/2023 访问量:60
Nodemailer 导致 Vercel 中使用 Qwik 应用程序构建失败
Nodemailer causing build failures in Vercel with Qwik app
问:
我在将我的 Qwik 应用程序部署到 Vercel 时遇到了问题。每当导入 nodemailer 时,都会导致构建失败并出现以下错误:
[commonjs--resolver] Cannot bundle Node.js built-in "events" imported from "node_modules/nodemailer/lib/mailer/index.js". Consider disabling ssr.noExternal or remove the built-in dependency.```
I've tried:
Upgrading nodemailer to the latest version
Adding ssr.noExternal to my vite config
Removing nodemailer entirely and the build succeeds
But I need to keep nodemailer for sending emails. How can I resolve this conflict between nodemailer and Vercel/Qwik?
My packages:
Qwik 1.2.6
Nodemailer 6.9.4
Vercel CLI 29.1.1
Node v18.17.1.
答: 暂无答案
评论