Aneakot

The future belongs to those who prepare for it today.

  • Welcome to WordPress! This is your first post. Edit or delete it to take the first step in your blogging journey.

  • npm is a node package manager

    Commands

    npm install <package-name>
    npm i
    npm i <package> -g
    isntall dependencies
    -g: install the package globally
    pacakge@version: to install a specific package version
    npm help <command>get command help
    ex: npm help install
    npm –version
    npm -v
    get npm version
    npm init
    npm init -y
    init a folder to create a package.json file
    -y use the default options
    npm list
    npm list –depth <number-of-level>
    npm list –depth <level> –dev (or –prod or –parseable)
    npm ls
    list packages in a project
    ex: npm list –depth 2
    npm list -glist the packages you have installed globally
    npm uninstall <package-name>
    npm rm or nom un or npm r
    uninstall a library
    –global: to uninstall the library globally
    npm updateupdate your libraries
    npm config
    npm get
    npm set
    setting defaults