DEV Community

Cover image for How can I view console.log() statements when deploying a Next.js app on Vercel?
Jackson Kasi
Jackson Kasi Subscriber

Posted on

How can I view console.log() statements when deploying a Next.js app on Vercel?

I have a Next.js app deployed on Vercel, and I need to view the console.log() statements when any server-side or client-side rendered page is called. I have noticed that I can see these logs when running the app locally in my terminal, but I cannot see them in Vercel's function logs.

I am specifically interested in viewing these logs to debug an issue where a page that works on my local system is resulting in a 504 error when deployed to Vercel. The page's API call never takes more than 3 seconds.

What are some ways to view these console logs in Vercel, or is there an alternative way to debug the 504 error that I am experiencing?

However, I am not able to see these logs in Vercel's function logs. Is there any other way to view these logs?

Image description

but I think this happens on a site called "favicon.ico`

This favicon.ico link opens/works on the local system next to dev mode. but in Vercel, this gives 504 errors.

Thank you for your help!

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs