function for upgrading a node module