Fix KeyError: 'dependencies' in nodejs

`update_package` raises `KeyError: 'dependencies'` if there are no node modules installed.