• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

HOW to Install NPM on ubuntu 17.04

2412

To Install NPM on ubuntu 17.04

Node.js is a platform built on Chrome’ s JavaScript runtime for easily building fast and scalable network applications.Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Also, npm makes it easy for JavaScript developers to share and reuse code, and it makes it easy to update the code that you’ re sharing.
npm is written in Node.js, so you need to install Node.js in order to use npm and this tutorial covers the method to install NPM node.js on Ubuntu 17.04.

 

Installing NPM 

First,   make sure you update your package repository cache by making use of the following command

root@linuxhelp:~# apt-get update
Hit:1 http://old-releases.ubuntu.com/ubuntu zesty InRelease
Hit:2 http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu zesty InRelease
Hit:3 http://old-releases.ubuntu.com/ubuntu zesty-updates InRelease     
Hit:4 http://old-releases.ubuntu.com/ubuntu zesty-security InRelease
Reading package lists... Done


And then, you need to upgrade it as follows.    

root@linuxhelp:~# apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
.
.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for systemd (232-21ubuntu7.1) ..


As mentioned earlier,   NPM is a Node.js package manager, so we need to install both for NPM to function. So you can install Node.js and NPM together with the following command.

root@linuxhelp:~# apt-get install nodejs npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
.
.
Setting up node-tar (2.2.1-1) ...
Setting up node-gyp (3.4.0-1) ...
Setting up npm (3.5.2-0ubuntu4) ...


Now run the following command to verify whether Node.js is working correctly.

root@linuxhelp:~# apt install nodejs-legacy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
.
Processing triggers for man-db (2.7.6.1-2) ...

 

Update the NPM package repository cache with the following command.

root@linuxhelp:~# npm update

 

Also, search for a web framework, you would run the following command.

root@linuxhelp:~# npm search web framework
npm WARN notice update to the newest npm client for improved search results: npmjs.com/get-npm
| |----------------------------------------------------------------------------------------------------------|
NAME                    DESCRIPTION                                                  AUTHOR               DATE 
@sailshq/express        Sinatra inspired web development framework                   =sgress454 =irl&hellip      2017-
aframe                  A web framework for building virtual reality experiences.    =caseyyee =cvan&hellip      2017-
.
.
web-rax-framework       Rax framework for web.                                       =wintercn =yacheng&hellip   2017-

You can install a Node.js module globally or locally. The difference is that, global node modules can be accessed like any other commands, but it’ s not the case for locally installed modules. Soon you will see the difference.
Here we install “ express”  module locally to show you how to install Node.js module with NPM.

 

Also, make sure you create a directory for this Node.js project and navigate to the directory.

root@linuxhelp:~#mkdir node-demo & &  cd node-demo
root@linuxhelp:~/node-demo# 

 

And then, run the following command. 

root@linuxhelp:~/node-demo# npm install express
/home/user1/node-demo
`-- express@4.16.2 
  +-- accepts@1.3.4 
  | +-- mime-types@
.
.
npm WARN node-demo No README data
npm WARN node-demo No license field.

 

You can also install a module globally. Let’ s say you want to install ‘ express-generator’ globally, you would be running the following command.

root@linuxhelp:~/npm -g install express-generator
/usr/local/bin/express ->  /usr/local/lib/node_modules/express-generator/bin/express-cli.js
/usr/local/lib
`-- express-generator@4.15.5 
  +-- commander@2.11.0 
  +-- ejs@2.5.7 
  +-- mkdirp@0.5.1 
  | `-- minimist@0.0.8 
  `-- sorted-object@2.0.1

 

You can list locally installed Node.js modules with the following command. 

root@linuxhelp:~/node-demo# npm list 
/home/user1/node-demo
`-- express@4.16.2
  +-- accepts@1.3.4
  | +-- mime-types@2.1.17
  | | `-- mime-db@1.30.0
.
.
+-- type-is@1.6.15
  | `-- media-typer@0.3.0
  +-- utils-merge@1.0.1
  `-- vary@1.1.2

 

You can install globally installed Node.js Modules with the following command.

root@linuxhelp:~/node-demo# npm -g list
/usr/local/lib
`-- express-generator@4.15.5
  +-- commander@2.11.0
  +-- ejs@2.5.7
  +-- mkdirp@0.5.1
  | `-- minimist@0.0.8
  `-- sorted-object@2.0.1

With this, the tutorial Installing NPM on Ubuntu 17.04 comes to an end. 
 

Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

how can I setup two instance of node on windows?

A

please refer the following link, https://www.linuxhelp.com/how-to-install-multiple-instance-of-node-using-nvm-on-windows-7/

Q

how to install nodejs on ubuntu?

A

To install nodejs on ubuntu Please refer the link as follow "https://www.linuxhelp.com/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04/".

Q

How to install nodejs on centos?

A

To install nodejs on centos use the following link as "https://www.linuxhelp.com/how-to-install-node-js-in-centos/".

Q

What is nodejs and Npm?

A

Node.js is a platform built on Chrome&rsquo s JavaScript runtime for easily building fast and scalable network applications.Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices

Q

What is the command to install NPM on ubuntu 17.04?

A

The command to install NPM on ubuntu 17.04 is apt-get install nodejs npm

Related Tutorials in HOW to Install NPM on ubuntu 17.04

Related Tutorials in HOW to Install NPM on ubuntu 17.04

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in HOW to Install NPM on ubuntu 17.04

Related Forums in HOW to Install NPM on ubuntu 17.04

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018

Related News in HOW to Install NPM on ubuntu 17.04

Related News in HOW to Install NPM on ubuntu 17.04

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
KDE Connect App was removed from Google Play Store and brought back in 24 hours
KDE Connect App was removed from Google Play Store and brought back in 24 hours
Mar 22, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.