Bugfix: NPM module and state (support for JSON Arrays)

NPM may return JSON arrays which were not supported by the NPM module and the NPM state. If you try to install an already existing NPM package the state fails.