more portably solution for node and npm calls