I'm working with raspbian ver 8. I have a preinstalled version of node running (ver 5.0.0). I'm trying to downgrade it to 4.6.1 using n. However, i'm getting the following error after a long wait
pi@raspberrypi:~ $ sudo n 4.6.1
install : node-v4.6.1
Error: invalid version 4.6.1
Can anyone provide the root cause of this along with the possible fix? Thanks in advance
In this case, remove current node js.
Then download the version code, then build and install.
I also face this problem earlier, in my case, build from source code solve the problem.