Wednesday, January 8, 2014

npm package folder on mac

The npm package may be installed on the following folders on mac
1.  ./node_modules
If the package is installed locally, the folder is in the current folder's ./node_modules of the current package. You should install the package locally, if the package will be loaded into your js app with require() method.

2.    /usr/local/lib/node_modules folder
If the package is installed globally, i.e, installed with -g flag, then it is installed in
 /usr/local/lib/node_modules folder

3. ~/.npm 
There will be another copy in your home directory's ~/.npm folder, it is a cache that npm uses to avoid re-downloading the same package multiple times. There's no harm in removing it. You can empty it with the command:
npm cache clean


To uninstall a local npm package, use
npm rm

to uninstall a global npm package, use
npm rm -g

To check an installed npm package version, use
npm view packagename

2 comments:

  1. Your blogs are great. Are you also searching for nursing capstone writing project? we are the best solution for you. We are best known for delivering quality nursing capstone writing services to students without having to break the bank

    ReplyDelete
  2. I love this. It is soo informative. Are you also searching for Swedish assignment writing help we are the best solution for you. We are best known for delivering the best services to students without having to break the bank

    ReplyDelete