Ugly, ugly. But seems to work. Complexity, I believe, is due to the fact that it's performing operations in bash _before_ launching node, so NPM isn't equipped to provide useful information.