While hosting my webapp on heroku I got a message of some bugs in my npm package, my npm package was of version 3 and node.js was of version 8, I wrote thinking that I can update my npm version I tried to update it but the version remained same so I decided to uninstall it and wrote the command "npm uninstall " and than again tried to install npm but in vain ,finally I uninstalled my node.js and reinstalled tha npm will automatically get installed with it, but this too didn't work now I have node of version 10 with no npm which I got to know by checking version of npm which gave me message of "command not found ", now my every try to install npm has failed , may anyone suggest me what I can do to restore my losses and resume my work.
Asked
Active
Viewed 887 times
0
-
Have you tried `sudo apt-get install npm`? – Daniyal Lukmanov Oct 08 '19 at 08:01
-
On which operating system are you trying this operation? – Nabeel Shaikh Oct 08 '19 at 08:21
1 Answers
0
I am not sure if you have Linux or Windows. First I would check if the npm folder is in path. You can follow one of these two to add to path if it is not done yet.
Alternatively you can install node with node version manager (nvm):

mxsxs2
- 939
- 4
- 16