This patch changes NPM driver error handling to return error code instead of calling `exit(1)` directly.