skip to Main Content

I was wondering where the default node.js modules are stored on a mac, such as fs, stream, path, etc. I tried looking into my /usr folder, but I couldn’t find anything. Any help is welcome.

2

Answers


  1. You can try npm list -g this command will list globally installed packages with their path.

    Login or Signup to reply.
  2. The terminal command to find the root location (where global modules are installed) is:

    npm root -g
    

    In a Mac, it should be /usr/local/lib/node_modules.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search