Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Update Node.js and npm to latest version in 4 Easy steps

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 367
    Comment on it

     

    Node Package Manager or NPM is the default package manager for JavaScripts that offers offers two prominent functionalities:

     

    • Online storage facility for the node.js modules that are searchable on search.nodejs.org
    • The Command line utility to install Node.js packages, perform dependency management and version management of Node.js packages.

     

    Packages are in CommonJS format and include the metadata file in JSON format. It is believed that more than 280,000 packages are available on the NPM registry. The registry does not follow any vetting process for the submission, hence the packages found are insecure, malicious or low quality. On the contrary, NPM server administrators are proficient in banning the malicious users or deleting the malicious packages.  

     

    Just like many open-source technologies, Node.js also gets minor updates every week to boost the functionality, security and stability among various branches. We surfaced a lot of queries   regarding the installation of latest Node on Windows, Linux-based and macOS machines.

     

    In this article I will share an easy way to Update Node Using a Node Package Manager in 4 easy steps

     

    Node comes with pre-installed npm, however the manager is updated more recurrently than Node. To update the Node using a npm follow these steps:

     

    Step 1)  Run npm -v to see which version you have

     

    Step 2) Install latest npm update run npm install npm@latest -g

     

    Step 3) Again run npm -v to double check that the npm updated correctly.

     

    Step 4) To update Node, you’ll need npm’s handy n module. Run this code to clear npm’s cache, install n, and install the updated stable version:

     

    sudo npm cache clean -f
    sudo npm install -g n
    sudo n stable

     

    Use n latest to install the latest release.Apart from that, you can run n #.#.# to get a specific Node version.

     

    How did you find the article?

     

    Please feel free to share your thoughts in the comments section below.  

    Update Node.js and npm to latest version in 4 Easy steps

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: