tools: Use package.json to identify which nodejs deps to install

Fixes #1498
Closes #1502