Tuesday, May 23, 2017

How to install npm on Lubuntu 16.04

How to install npm on Lubuntu 16.04

Npm is package dependency manager for nodejs application and javascript in general, similar to composer for php and gem for ruby. If you are a javascript developer you are going to need npm installed on your system. In this article i will show you how to install npm on lubuntu 16.04.

There are several ways of installing npm, but the most convenient way is using the default lubuntu/ubuntu repository. For lubuntu 16.04, both npm and nodejs are available on the official repository.

How to install npm on lubuntu 16.04
  • open command line 
  • install npm with this
  • sudo apt-get install npm
  • check npm version with this
  • npm -v
Note that when you install npm using the command above it will also installing nodejs automatically.


How to use npm
You can run npm simply by typing npm <command>, where <command> can be:

access, add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, dist-tag, dist-tags, docs, edit, explore, faq, find, find-dupes, get, help, help-search, home, i, info, init, install, install-test, issues, it, la, link, list, ll, ln, login, logout, ls, outdated, owner, pack, ping, prefix, prune, publish, r, rb, rebuild, remove, repo, restart, rm, root, run-script, s, se, search, set, show, shrinkwrap, star, stars, start, stop, t, tag, team, test, tst, un, uninstall, unlink, unpublish, unstar, up, update, upgrade, v, verison, version, view, whoami

Once you have npm, you can install other tools such as bower, grunt, gulp, etc. 

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete