We analyze a class of opinion formation processes with the spreading mechanism based on the q-voter model with stochastic driving on complex networks. In the models, opinion dynamics may occur under two types of social response: conformity and anticonformity. The letter can be classify as one kind of nonconformity. The competition between interactions arising from conformity and nonconformity gives rise to order-disorder phase transitions, which are investigated by means of the pair approximation and Monte Carlo simulations. Moreover, we analyze how the range of interactions impacts the model behavior and its stationary properties. The applied mathematical approach allowed us not only to anticipate the shape of phase diagrams but also to derive formulas for the critical points in the case of continuous phase transitions. The analytical results depend on the average node degree of the considered network on which the spreading occurs. The pair approximation predictions exhibit substantial agreement with simulations for some structures. The most interesting is the importance of the interaction range in the case of conformity and anticonformity. It seems that local anticonformity disorders the system less than the global one, and its influence on the system depends less on the network topology. On the other hand, global conformity more efficiently orders the system and lowers the model sensitivity to the underlying network structure.