💻 Take your coding skills to the next level with "500+ Ultimate ChatGPT Prompts For Developers" – the game-changer every developer needs, click here to order now.

Next.js app in production

Published March 6, 2022Last updated May 28, 20231 min read

Consider the following things when the Next.js app is running in production.

  • Error tracking and alerting

Error tracking and alerting are crucial in the production environment, proactively fixing the errors leads to a better user experience. Sentry is one of the error tracking services, and it provides alerting for unhandled exceptions. You should receive an email when something wrong happens.

Sentry issues show the error stack trace, device, operating system, and browser information. The project dashboard shows an unhandled exception once it's thrown. Run the following commands for integration with the Next.js app.

npm i @sentry/nextjs
npx @sentry/wizard -i nextjs
  • Intl API is not supported in some browsers. Cover it with a fallback.

  • localStorage API is not available when cookies are blocked. Cover it with a fallback.


© 2023