fix nodejs.package_version when no package is installed

`npm list` returns an empty dict when no packages is installed and `nodejs.package_version` was expecting a key from this empty dictionary.