Since it is in the path, you can now proceed to the next step, which is to update node using: This has the effect of installing the n module in your $HOME/.node_modules_global. We said no sudo! The correct way is to simply run the same command without sudo npm i -g n Now if you want to update node the wrongly suggested way is to use sudo npm i -g n #don't use sudo! You should also have added it to $PATH in your. It should be something like $HOME/.node_modules_global. To do so you have changed the global node modules installation directory. Npm should be installed properly without the sudo part. You probably have a version of node lying around. That should have convinced you that the only way to update node is through a node module called n. You should not sudo too much on programs you do not know. local/ Updating to latest version (if you changed the global node modules dir) Now all your global modules should live inside. ![]() To do so add the following line to ~/.bashrc: export PATH= " $HOME/.local/bin: $PATH" If it is the first time you are installing this, simply download the LTS from Ĭreate a ~/.local dir, which is used by many other programs (so it should already exist). T13:08:32.169Z Update existing proper installation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |