npm install both globally and locally, so we can be sure nothing wrong happens. Also fixed a mistake in the puppet file that ended up running the compile script before nodejs was installed