Since I had problems updating npm@2.12.0 , here are the commands that let me solve the problem:
npm uninstall -g npm npm install -g npm@2.12.1
To check your version:
npm -v
It should be 2.12.1. After that, I could run my install and update commands normally.
Source: see Idez comment on github.
source share