if you use mac, use this script
and then, add ". ~/.nvm/nvm.sh" into your .bash_profile.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
to apply the change, you need run: source ~/.bash_profile.
you can choose a node version by:
nvm use 0.10
If you switch node from one version to another one, you should delete all npm packages which is "node_modules" folder.
If you restarted your pc, you should reset version again: nvm use 0.10