orliesaurus / nodemailer-mailgun-transport

nodemailer is an amazing node module to send emails within any of your nodejs apps. This is the transport plugin that goes with nodemailer to send email using Mailgun 🔫
MIT License
880 stars 97 forks source link

Module not found: Can't resolve 'velocityjs' #128

Closed xiaolinforce closed 5 months ago

xiaolinforce commented 5 months ago

I always receive this.

Import trace for requested module:
./node_modules/consolidate/index.js
./node_modules/nodemailer-mailgun-transport/src/index.js
./server/service/email/mailer.ts
./app/api/test/route.ts
 ⨯ ./node_modules/consolidate/lib/consolidate.js:201:63
Module not found: Can't resolve 'velocityjs'
sorensenjg commented 4 months ago

@xiaolinforce what was the solution?

xiaolinforce commented 4 months ago

@sorensenjg For my project, I use app router in NextJs. I have to add experimental: { serverComponentsExternalPackages: ['nodemailer-mailgun-transport'], } in nextConfig in next.config.js and it will work.