General procedure for the synthesis of methyl 1H-indazole-7-carboxylate from methyl 2-amino-3-methylbenzoate: To a solution of methyl 2-amino-3-methylbenzoate (17.5 g, 106 mmol) in chloroform (300 mL) was slowly added acetic anhydride (22.6 mL, 239 mmol, 2.3 eq.), and the temperature of the reaction was controlled to be lower than 40 °C. After addition, the reaction mixture was stirred at room temperature for 1 hour. Subsequently, potassium acetate (3.00 g, 30.6 mmol, 0.3 eq.) and isoamyl nitrite (30.6 mL, 228 mmol, 2.2 eq.) were added and the reaction mixture was heated to reflux for 24 hours. After the reaction was completed, it was cooled to room temperature. The reaction mixture was washed with saturated aqueous sodium bicarbonate, the organic phase was dried over anhydrous sodium sulfate and concentrated under reduced pressure. Methanol (100 mL) and 6N hydrochloric acid (100 mL) were added to the residue and stirred at room temperature for 18 hours. The solvent was removed under reduced pressure and the residue was ground with ethyl acetate (100 mL). The solid product was collected by filtration, washed with ethyl acetate (20 mL) and dried to give 15.3 g (68% yield) of methyl 1H-indazole-7-carboxylate hydrochloride. The product was characterized by 1H NMR (500 MHz, DMSO-d6) and mass spectrometry (APCI): 1H NMR δ 13.3 (bs, 1H), 8.26 (d, 1H), 8.12 (d, 1H), 8.25 (dd, 1H), 7.27 (t, 1H), 3.97 (s, 3H); MS (APCI) m/z 177 (M++1) .