Can someone tell me where can I find the Node.js modules, which I installed using npm?
Can someone tell me where can I find the Node.js modules, which I installed
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Global libraries
You can run
npm list -gto see which global libraries are installed and where they’re located. Usenpm list -g | head -1for truncated output showing just the path. If you want to display only main packages not its sub-packages which installs along with it – you can use –npm list --depth=0which will show all packages and for getting only globally installed packages, just add -g i.e.npm list -g --depth=0.On Unix systems they are normally placed in
/usr/local/lib/nodeor/usr/local/lib/node_moduleswhen installed globally. If you set theNODE_PATHenvironment variable to this path, the modules can be found by node.Windows XP –
%USERPROFILE%\AppData\npm\node_modulesWindows 7, 8 and 10 –
%USERPROFILE%\AppData\Roaming\npm\node_modulesNon-global libraries
Non-global libraries are installed the
node_modulessub folder in the folder you are currently in.You can run
npm listto see the installed non-global libraries for your current location.When installing use -g option to install globally
npm install -g pm2– pm2 will be installed globally. It will then typically be found in/usr/local/lib/node_modules(Usenpm root -gto check where.)npm install pm2– pm2 will be installed locally. It will then typically be found in the local directory in/node_modules