Replaced npm api calls with npm via child process