updated to use common.npm() and got rid of console pollution

towards fixing #6423