Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to find installed npm package version

    How to find installed npm package version

    By RahulJune 2, 20202 Mins ReadUpdated:June 3, 2020

    NPM is the package manager for nodejs modules. It is used to install, update and remove packages from a nodejs application. In this tutorial you will learn how to find installed package version of modules on your system.

    Advertisement

    You can use npm list command to search for local packages and npm list -g for globally installed packages.

    npm list                ##List all locally installed packages 
    npm list -a             ##List all globally installed packages  
    

    Find specific package version

    You can find the version of a specific package by passing its name as an argument. For example, npm list grunt will result in:

    npm list oauth
    
    `-- [email protected]
    

    Find all packages version

    Alternatively, you can just run npm list without passing a package name as an argument to see the versions of all the packages installed in your current project. Use -g to find globally installed packages.

    npm list
    

    Output:

    | +-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | | +-- [email protected]
    | | | `-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | | +-- [email protected]
    
    

    Above list shows all the packages installed including there dependencies

    You can also add --depth=0 argument to list installed packages without their dependencies.

    npm list --depth=0
    

    Find packages require updates

    To find out which packages need to be updated, you can use npm outdated command to list all packages installed with older versions.

    npm outdated --depth=0             ##For locally installed packages 
    npm outdated -g --depth=0          ##For  globally installed packages  
    

    npm find available packages  update

    node NodeJs npm
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Error: EACCES: permission denied, scandir (Resolved)

    How To Install Python 3.11 on Ubuntu 22.04 / 20.04

    Excluding URLs from ProxyPass in Apache

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.