work in node, and have more helpful error message