Update NodeJS with npm
Emmanuel Gautier / October 26, 2014
1 min read
Update : Now, nvm can be simpler to manage NodeJS versions. You can install the version you want and those versions can be differents across all your projects and shared with the file .nvmrc
. More informations on the nvm README
New NodeJS releases are done often, so you need to keep your installation up to date. To do so, you can use your Linux distribution package manager (apt, dnf, ...) or brew for OSX. Another way is to use npm.
Here some command lines to update NodeJS on your dev environment. The update will take the latest stable version of NodeJS.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
If you only want to switch from one version to another, just replace the previous line with the following line. Of course, you can update the version number depending on your need.
sudo n 0.10.33
If the installation is done, check the version number with the following command :
node -v
Consulting
If you're seeking solutions to a problem or need expert advice, I'm here to help! Don't hesitate to book a call with me for a consulting session. Let's discuss your situation and find the best solution together.
Related Posts
Inject HTML content into an Astro component
While working on a project within the Astro framework, I encountered a scenario where I needed to fill HTML content within a script tag.
Read Package.json file from Node.JS module
When you write a program you may want to read the content of the package.json file like what is the current package version. Here is one very simple way to read the content of this file.
Import a JSON file content from a Node.JS module
With the new Node.JS module it is possible to read the content of a JSON file with the import function but there is the right way to do it.
Featured Posts
Introducing new blog on OAuth, OpenID Connect, and IAM Solutions
I'm excited to announce the launch of a new blog named CerberAuth, where I'll be exploring the world of OAuth, OpenID Connect, and IAM solutions for modern security.
MySQL Docker Image for Mac ARM M1
MySQL official Docker image is not available for Apple ARM-based M1 and M2 CPUs. But there is some options to use mysql image on Mac and more globally on ARMv8 microarchitecture.
How to deal with Docker Hub rate limit on AWS
Since 2020, DockerHub has been limited to only 200 container image pull requests per six hours. This article will help you to deal with this limitation on AWS.