Be sure you only have one version of NodeJS installed. Try these two:
node --version sudo node --version
I initially installed NodeJS from source, but it was the incorrect version and 'upgraded' to the newest version using
nvm, which doesn't remove any previous versions, and only installs the desired version in the
/root/.nvm/versions/... directory. So
sudo node was still pointing to the previous version, whilst
node was pointing to the newer version.