How to Install pkg-dir NPM Packages on Ubuntu / Debian

How to Install pkg-dir software package in NPM Packages

pkg-dir : Find the root directory of a Node.js project or npm package. You can installing pkg-dir npm packages, there are two ways to install this module locally and globaly. -g option is specified to global. Execute the below command.

$ sudo npm install pkg-dir
$ sudo npm install -g pkg-dir

If want to update the pkg-dir package execute the command as below,

$ sudo npm update pkg-dir

Update package globally,

$ npm install -g pkg-dir

Git clone:

$ sudo  git clone https://github.com/rektide/pkg-dir.git
$ sudo  npm install -g ./pkg-dir

pkg-dir@2.0.0 /usr/lib/node_modules/pkg-dir

How to remove pkg-dir package :

You can uninstall or remove this package from your node_modules run the command as below,

$ sudo npm uninstall pkg-dir

Basic Information of pkg-dir NPM Package:

Package Name pkg-dir
Version 2.0.0
Description Find the root directory of a Node.js project or npm package
Released Date 2017-05-04T15:39:08.692Z
Published by sindresorhus
How to Learn https://www.npmjs.com/package/pkg-dir/tutorial