create t3 app build error
Hey,
The default config for create t3 app, with the following installs:
prisma
tailwind
nextauth
trpc
results in a build error of:
After some debugging, i found that removing
NODE_ENV="development"
stops the build error from occuring. Why is this?7 Replies
full error
I am using the default code that is inside of page.tsx/layout.tsx (but i stripped out some of the html:
page.tsx
Layout.tsx
just as a reference, i do not have a pages directory, and I also do not have a /404 page

try deleting the .next build folder and restarting your server
are you running turbo repo?
Hi,
Yes I am running turbo repo.
I have just tried building after deleting the
.next
build folder, but still get the same error. (It seems to switch between showing /404 and /500 as the pages that are erroring?
However, if I do remove NODE_ENV="DEVELOPMENT"
the build errors stop, although I do use my node_env=dev in other apps in my monorepo, so i was hoping to keep this.the project sets the
NODE_ENV
var automatically where you're running the code. It checks automatically if you're on production or development.
If removing it fixes the bugs then i would say to remove it
you can do your checks and it should still work normally
adding a ! operator at the end would ensure all the types
example: process.env.NODE_ENV!
the !
tells that the variable isn't null (i think)
i can't make anything of the error message you have attached above as well
i've had no experience with mono repos so i can't say muchOkay thank you for the responses 🙂