Last friday I received an update for npm5, but afterwards I noticed neither nodejs8 nor npm5 are working. I looks like now there is a dependency on a nodejs-common package which cannot be installed because a newer build of nodejsX has to be available. The other way around nodejsX and npmX cannot be installed without nodejs-common package. Anyone else noticed or knows a workaround?
This is the type of question that would probably be better asked in the Install or Applications Technical Help Forums.
You should post the entire error verbatim with your command invocation, if the error doesn’t display immediately after your command then there are various ways to capture the error from your systemlogs using journalctl (you can “follow” in real time, display the last 100 entries, etc)
These Dev forums are usually more for actual Development questions, not so much tools installation.