Validation on pubsweet add
When a component is added to the app through the command line tool, the entry gets written to the config file before it tries to install it from npm.
So, consider the following scenario.
pubsweet add yannis
will write 'yannis' to the list of components in the config.
It will then fail as there is (strangely) no npm package named 'yannis'.
If I run the app now, it will of course crash, as it tries to load a component that was never installed.
Maybe the changes to the config should be written in the end, or at least be deleted if installation fails.
Another validation that could be done, would be checking if a component already exists in the array.
As of now, running the command above would result in the components array saying
"yannis",
"yannis"