Node.js version: implement reporting of locations of problematic elements

Fixes #29. (or rather, finishes fixing it)

CC: @hnrch02 @XhmikosR @zacechola for review and/or testing