title: How to install through npm globally?
body: <p>I am on OS X(El Capitan). I install node using following command.</p>
  
  <p><code>brew install node</code></p>
  
  <p>Then I installed webpack using following command:</p>
  
  <p><code>npm install -g webpack</code></p>
  
  <p>And I also followed this url : <a href="https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md" rel="nofollow">Github Url</a>
  To install globally but when I am running
  <code>webpack</code> on my terminal I am getting</p>
  
  <p><code>zsh: command not found: webpack</code></p>
  
  <pre><code>~/projects/personal/React  npm install -g webpack
  /Users/rahul/.npm-packages/bin/webpack -&gt; /Users/rahul/.npm-packages/lib/node_modules/webpack/bin/webpack.js
  
  &gt; fsevents@1.0.14 install /Users/rahul/.npm-packages/lib/node_modules/webpack/node_modules/fsevents
  &gt; node-pre-gyp install --fallback-to-build
  
  [fsevents] Success: "/Users/rahul/.npm-packages/lib/node_modules/webpack/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" is installed via remote
  /Users/rahul/.npm-packages/lib
  </code></pre>
  
  <p>export</p>
  
  <pre><code>Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Tp9FugZTE3/Render
  DISPLAY=/private/tmp/com.apple.launchd.ZgQngbBnwx/org.macosforge.xquartz:0
  EDITOR='subl -w'
  HOME=/Users/rahul
  ITERM_PROFILE=Custom
  ITERM_SESSION_ID=w0t4p1:4DEA1B55-94CE-48E7-85A6-347D29A53122
  ITERM_SHELL_INTEGRATION_INSTALLED=Yes
  LC_CTYPE=UTF-8
  LESS=-R
  LOGNAME=rahul
  LSCOLORS=Gxfxcxdxbxegedabagacad
  PAGER=less
  PATH=/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  PROJECT_HOME=/Users/rahul/Projects
  PWD=/Users/rahul/projects/personal/React
  SHELL=/bin/zsh
  SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Ixik08zS9V/Listeners
  TERM=xterm-256color
  TERM_PROGRAM=iTerm.app
  TERM_PROGRAM_VERSION=3.0.7
  TERM_SESSION_ID=w0t4p1:4DEA1B55-94CE-48E7-85A6-347D29A53122
  TMPDIR=/var/folders/kk/9jwxx0r532s_cff8m4rx080w0000gn/T/
  USER=rahul
  USER_NAME=Rahul
  VIRTUALENVWRAPPER_HOOK_DIR=/Users/rahul/.virtualenvs
  VIRTUALENVWRAPPER_PROJECT_FILENAME=.project
  VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh
  VIRTUALENVWRAPPER_WORKON_CD=1
  WORKON_HOME=/Users/rahul/.virtualenvs
  XPC_FLAGS=0x0
  XPC_SERVICE_NAME=0
  ZSH=/Users/rahul/.oh-my-zsh
  __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
  </code></pre>