Theo's Typesafe CultTTC
Theo's Typesafe Cult11mo ago
11 replies
Peform

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:
dashboard:build:    Collecting page data ...
dashboard:build:    Generating static pages (0/4) ...
dashboard:build: Error: <Html> should not be imported outside of pages/_document.
dashboard:build: Read more: https://nextjs.org/docs/messages/no-document-import-in-page
dashboard:build:     at O (E:\coding\project-remake1\apps\dashboard\.next\server\chunks\739.js:6:1263)
dashboard:build: Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
dashboard:build: Error: <Html> should not be imported outside of pages/_document.
dashboard:build: Read more: https://nextjs.org/docs/messages/no-document-import-in-page

After some debugging, i found that removing NODE_ENV="development" stops the build error from occuring. Why is this?
Was this page helpful?