New to node and need to install npm, node.js? Use NVM node version manager so you can install more than one version of nodejs.
I had to look for the answer to this until I found it. You update to a newer version of NVM node version manager the same way you install it regardless of how you install it. I am not sure what happens if you install nvm with curl then try to update it in another way.
For example I used the following in my terminal as not the root user, just a plain user curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
When I want to install the next version I replace the v0.35.3 with the next version and it does all the work. If you installed nvm as a root user then you will not be able to access it easily as any other user.
In fact, if you type nvm –version in the command line as a regular user after you installed it as a root user, you will be told it is not installed, or nvm is not a recognized command would you like to install. I did this, so that is how I learned not to install it as a root user.
I have used many tricks in the past such as creating my own BASH scripts which collected the files from folders and checked the order and trans-piled and minified them to single files. Even that process got to be a pain because it is hard to make sure things are loaded in the right order.
Webpack makes it easier
Instead of explaining webpack in a lot of paragraphs, I will create a list of videos and articles I find helpful. First off what is Webpack? I found this video to be very helpful.
Command ‘go’ not found, but can be installed with:
So you just installed Go on Linux huh?
This means you probably set the environmental variable via the command line which is temporary. Don’t install go this way. You could do as the documentation says and add :
However if you look in that file it has some important looking code in it. This is because it is a script.
It felt dirty to place the above code in that file so I did some research and found a better alternative. You simply create a new file in the /etc/profile.d directory and place the above export line of code in it and save it. You can name the file anything and add .sh to it and it will be found and loaded. Then you logout and back in like the documentation suggests and open a terminal and type “go version” and it works properly.
See my go_profile.sh file :
Doing it this way instead of adding it to the ~.profile file is better because it reduces the chance of messing up the code in a file. The script actually reads all of the files in the profile.d folder and this is why it works. For more information see this article in the section “Persistent environment variables”. You can do any other environmental variables you need set this way too.
They decided to make adding a desktop launch Icon even harder in Ubuntu 18, because you know we all love wasting our time googling all day trying to figure stuff out. It’s a repeating theme in the Linux community for decades now. Making things harder makes you feel smarter.
If you can avoid the UI and go for the command line, then go for it right. We all love typing in 120+ characters into the terminal, looking closely squinting, comparing character to character. It makes us feel smart like pretend hackers in movies right!!!
Why would anyone want to work efficiently anyways? Surely memorizing 1,000 linux commands and how the entire system works makes you feel smarter right? No? Me neither. My time is precious to me and maybe yours is to you too.
Here is a video that shows how to create desktop launch Icons. It still works in Ubuntu 18. Everything else you find suggests locating a file and typing a whole lot of lines of code. And since it is so obscure I will never remember it, I am creating this post so I can find it again later.