Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
Next.js production fails but dev works

I had tried to run Next.js project with next start(next build was ok and it works with next dev) and saw some error messages in browser console:

TypeError: e is undefined
Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Error rendering page:  TypeError: t is undefined

I've watched that link in error message and it says:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: [missing argument].[missing argument]

But I still don't understand where is the problem. Is there a way to disable code minification in next build and view a full traceback?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

  • The reason why it's doing that in prod and not dev is because nextjs will only check types on a production build (as far as I'm aware).
  • I think I've seen that error before when you pass a string or an invalid value to renderToString from react-dom/server.

The reason that's most likely happening is because nextjs will by default import all your exports and render the page for you, so in this case I don't believe you can just export named or default exports at will, I think it has to be a default export for the page component itself, while all the getStaticProps and other exports should be named.

To fix your issue just change export Example to export default Example.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!