Solution for windows platform:
In my case the computer had win7 and by mistake installed a newer version of nodejs.
To solve this problem I did:
- Starting with deleting nodesjs windows variables (system properties -> the advance tab)
- Uninstal nodejs
- Find the nodejs folder under program and delete it (tip: do it using cmd for faster results)
- Enter regedit (press and hold "windows key" and letter "R" in your keyboard then type "regedit" ... Be carefull with regedit!!
- Once regedit is open .. Edit menu then click on find
- In the dialog box type "nodejs"
- If it finds a key .. delete it. Press "F3" to find the next one and keep going until you delete them all.
- In case there is one not allowing you to delete you need to enter in "save mode or with admin rights" to be able to delete those keys.
- After that restart the computer, reinstall nodejs the newest version. It should be working fine.
That's what I did and it worked!