What is a Minimal Reproduction?

Software development is hard, and there are an infinite number of different ways that you can configure and code a given application. Additionally, with large and complex applications, the cause of an error can be traced back to a wide variety of different things, making issues even more difficult to debug. The creation of minimal reproductions is an essential tool in any seasoned developer’s belt for resolving difficult issues, as this process gradually eliminates causes of an issue, narrowing it down to only the root cause. Let’s walk through how exactly this powerful tool can be used to debug and resolve issues!

<aside> 💡 A minimal reproduction is a small test case to demonstrate a problem - often this problem is caused by a bug in the library or user code. Your minimal reproduction should contain the bare minimum code needed to clearly demonstrate that bug.

</aside>

Templates

Often, the best way to create a minimal reproduction is to start fresh, with a minimal functional template. Clerk provides minimal functional templates for each of the frameworks we have SDKs for, which are great starting points:

Steps to create a Minimal Reproduction

  1. Clone down one of these templates to have it locally on on your machine
  2. Run it locally (e.g. run the development server) and verify that it’s functional
  3. Create a new Clerk app on the Clerk dashboard
  4. Adjust your template project and keep adding code gradually until you get to the point where you are running into the same error