Preheat the oven to 180ºC. Peel the butternut squash and cut it in half lengthways and scoop out the seeds. Chop the squash into 2.5cm (1 inch) cubes. Place on a baking tray with the sliced onion, and peeled garlic. Sprinkle on the rosemary and drizzle with olive oil. Roast in the preheated oven for about 30 minutes until the onions and garlic are tender and golden and the squash is soft and cooked through.
Place the roasted vegetables into a food processor or blender and blend until smooth. Add a little bit of water to get a thick smooth purée.
In a medium frying pan with high sides heat 1 teaspoon of olive oil over medium heat. Once the oil is hot, gently fry the pancetta or prosciutto until it’s crispy. Once crispy, spoon all of the pancetta into a small bowl along with the fat from the pan.
Spoon the butternut squash puré into the frying pan, pour in 75ml water, and the milk and stir in the gnocchi. Gently simmer uncovered for 8-10 minutes until the gnocchi is tender. Stir in the parmesan and taste and adjust the seasoning and squeeze in the lemon juice. Stir half the pancetta or crumble half the prosciutto into the sauce adding in some of the fat too.*see notes
Tear the mozzarella into 4-6 pieces and place on top of the gnocchi. Place under the grill (broiler) for about 5 minutes until the cheese is melted. Top with the remaining pancetta, cracked black pepper, walnuts and fresh parsley.