search

Home  >  Q&A  >  body text

Where are the default node modules stored?

I want to know where the default node.js modules are stored on Mac, such as fs, stream, path, etc. I tried looking in my /usr folder but couldn't find anything. Any help is welcome.

P粉092778585P粉092778585486 days ago662

reply all(2)I'll reply

  • P粉495955986

    P粉4959559862023-09-15 09:24:03

    You can trynpm list -gThis command will list globally installed packages and their paths.

    reply
    0
  • P粉571233520

    P粉5712335202023-09-15 00:28:26

    The terminal command to find the root location (global module installation location) is:

    1

    npm root -g

    On Mac, this should be /usr/local/lib/node_modules.

    reply
    0
  • Cancelreply