Debugging Next.js App in Production

Bug(s) in production NextJS app

To Do App
"/": ["static/chunks/pages/index-b1a6b3cf2be8bc12f539.js"]

So there is a hash generated along with the filename, the hash will change whenever we rebuild your application.

Debugging Backend APIs

About Requestly

Solution

Redirect Production JS To Local

Setting up Requestly

Step1 — Install Requestly

Step2 — Setup Redirect Rule

Redirect Rule — Redirect Production API End Point to Local API Endpoint

Now Debugging JS Code on Production

https://sample-nextjs-app-flax.vercel.app/_next/static/chunks/pages/index-b1a6b3cf2be8bc12f539.js

Request URL “WildCard Matches” https://sample-nextjs-app-flax.vercel.app/_next/static/chunks/pages/index-*.js

Destination — https://localhost:3000/_next/static/chunks/pages/index.js

Requestly Redirect Rule (Redirect Production JS to localhost JS)

References —

--

--

--

Setup redirects, modify headers, switch hosts, insert user scripts and much more. Install it on Chrome & Firefox and join our family of more than 100,000 devs!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Advent Of Code — Like a GIF For Your Yard — Puzzle 18

React: Day 32

React: Day 32

Using JavaScript’s Bitwise Operators in Real Life

How to create & use react component

Recap Javascript Fundamental Concept

Only allow a Git commit if your Mocha tests are successful

Introduction to Algorithms

Automate API Request with bash and Curl

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Requestly

Requestly

Setup redirects, modify headers, switch hosts, insert user scripts and much more. Install it on Chrome & Firefox and join our family of more than 100,000 devs!

More from Medium

[3/9] Let’s Create a Firebase Project. Environment Setup — E-commerce Development Series

Building A Sports Odds Platform Using Cloudbet Market Helper

Displaying Game Lines in One View‍ with the Market Helper

Comprehensive Next.js environment variable guide

Location Based IOT Devices

Horseshoe locks for Cycles