We herein report a multicomponent reaction for the synthesis of N-unsubstituted-1,2,3-triazoles and N-substituted-1,2,3 triazoles from the reaction of aldehydes, nitroalkanes, and sodium azides/glycosyl azides in the presence of 1,1,1,3,3,3-hexafluoroisopropanol, a hydrogen bond-donating reaction medium. This three-component reaction provides a metal-free strategy for sequentially forming one C-C and two C-N bonds in a one-pot fashion. One-pot mild reaction condition, operational simplicity, wide substrate scope, good functional group tolerance, easy purification, high reaction yields, and altogether excellent regioselectivity are the notable advantages of this 1,2,3-triazole-forming protocol. Moreover, this protocol provides practical access to the gram-scale synthesis of potent inhibitors of indoleamine 2,3-dioxygenase 1.