Preheat and prep: Heat the oven to 350°F (175°C). Place the unbaked pie crust into a 9-inch pie dish.
If using store-bought, crimp the edges and chill while you make the filling.
Melt the butter: Melt butter and let it cool for 5 minutes so it doesn’t scramble the eggs.
Mix wet ingredients: In a large bowl, whisk melted butter with granulated sugar and brown sugar until smooth. Add eggs and vanilla; whisk until glossy and combined.
Combine dry ingredients: In a separate bowl, whisk flour, baking powder, baking soda, and salt.
Make the batter: Add dry ingredients to wet and stir with a spatula until just combined. Do not overmix.
Fold in chocolate: Stir in chocolate chips (and nuts, if using).
Reserve a small handful of chips for the top if you want a pretty finish.
Fill the crust: Spread the thick batter evenly into the chilled pie crust. Sprinkle reserved chips on top.
Bake: Bake on the center rack for 35–45 minutes, until the top is golden and the edges are set. The center should still have a slight jiggle and a toothpick inserted 2 inches from the edge comes out with moist crumbs.
Cool: Let the pie cool on a rack for at least 30–45 minutes.
It will set as it cools, making slicing easier.
Serve: Slice warm or at room temperature. Finish with a pinch of flaky sea salt and a scoop of vanilla ice cream if you like.