parapheen
parapheen
TTCTheo's Typesafe Cult
Created by parapheen on 10/13/2023 in #questions
Nextjs build fails on Docker due to env amid SKIP_ENV_VALIDATION
Hey, I'm building an app with nodemailer inside the nextjs app and trying to build it with docker. The docker build is failing on build stage due to env parameters. I run with the SKIP_ENV_VALIDATION parameter. here is the log output
#16 46.35 TypeError: Cannot set properties of undefined (setting 'mailer')
#16 46.35 at new Mail (/app/node_modules/nodemailer/lib/mailer/index.js:45:33)
#16 46.35 at module.exports.createTransport (/app/node_modules/nodemailer/lib/nodemailer.js:53:14)
#16 46.35 at /app/.next/server/chunks/3367.js:5293:71
#16 46.35 TypeError: Cannot set properties of undefined (setting 'mailer')
#16 46.35 at new Mail (/app/node_modules/nodemailer/lib/mailer/index.js:45:33)
#16 46.35 at module.exports.createTransport (/app/node_modules/nodemailer/lib/nodemailer.js:53:14)
#16 46.35 at /app/.next/server/chunks/3367.js:5293:71
here is the code I initialize nodemailer
import nodemailer from "nodemailer";
import { env } from "~/env.mjs";

export const transporter = nodemailer.createTransport(env.EMAIL_SERVER, {
secure: true,
});
import nodemailer from "nodemailer";
import { env } from "~/env.mjs";

export const transporter = nodemailer.createTransport(env.EMAIL_SERVER, {
secure: true,
});
Why and how does building stage of next app checks the issues with env? How to solve it?
3 replies
TTCTheo's Typesafe Cult
Created by parapheen on 8/8/2023 in #questions
Subteams design model
Hey everyone, got inspired by the post on bullet train https://blog.bullettrain.co/teams-should-be-an-mvp-feature/. And got interested how to model Team having subteams?
3 replies
TTCTheo's Typesafe Cult
Created by parapheen on 4/14/2023 in #questions
How to inject dynamic meta tags with Next-Seo
Got a bit confused with SSR. I'm using trpc, fetching some data with which I want to construct title, description meta tags. On some sites it looks ok (displaying title and description) on some I get undefined in the text of the tags. Assuming that the tags are generated before the trpc request finished. I've also checked issues with ssr in trpc and it confused me. Long story short, what's the best way to dynamically set meta tags for [id].tsx like files?
4 replies