title: how to upgrade a dependency of a global package in npm
body: <p>I have installed globally <code>pouchdb-server</code> and I got this message about <code>graceful-fs</code>:</p>
  
  <pre><code>$ npm install -g pouchdb-server
  npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
  npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases &gt;= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
  </code></pre>
  
  <p>As the message says, the package will failwith <code>node &gt; 7.0</code> (which I use), so I would like to know how to perform the upgrade.</p>
  
  <p>If I execute:</p>
  
  <pre><code>$ npm ls graceful-fs -g
  </code></pre>
  
  <p>I see that <code>graceful-fs</code> is used in several global packages, but the only one with the old version is in `pouchdb-server:</p>
  
  <pre><code>├─┬ pouchdb-server@1.2.1
  │ ├─┬ couchdb-harness@0.1.6
  │ │ └─┬ glob@3.1.21
  │ │   └── graceful-fs@1.2.3
  │ ├─┬ http-pouchdb@1.1.3
  │ │ └─┬ pouchdb@5.4.5
  │ │   └─┬ lie@3.0.4
  │ │     └─┬ es3ify@0.2.2
  │ │       └─┬ jstransform@11.0.3
  │ │         └─┬ commoner@0.10.8
  │ │           └── graceful-fs@4.1.11
  │ ├─┬ pouchdb-adapter-node-websql@6.1.0
  │ │ └─┬ websql@0.4.4
  │ │   └─┬ sqlite3@3.1.8
  │ │     └─┬ node-pre-gyp@0.6.31
  │ │       ├─┬ tar@2.2.1
  │ │       │ └─┬ fstream@1.0.10
  │ │       │   └── graceful-fs@4.1.9
  │ │       └─┬ tar-pack@3.3.0
  │ │         └─┬ fstream@1.0.10
  │ │           └── graceful-fs@4.1.9
  │ └─┬ pouchdb-node@6.1.0
  │   └─┬ leveldown@1.5.0
  │     └─┬ prebuild@4.5.0
  │       ├─┬ node-gyp@3.4.0
  │       │ ├─┬ fstream@1.0.10
  │       │ │ └── graceful-fs@4.1.11
  │       │ └── graceful-fs@4.1.11
  │       └─┬ node-ninja@1.0.2
  │         └── graceful-fs@4.1.11
  ├─┬ webpack@1.13.1
  │ ├─┬ enhanced-resolve@0.9.1
  │ │ └── graceful-fs@4.1.4
  │ └─┬ watchpack@0.2.9
  │   └─┬ chokidar@1.5.1
  │     └─┬ fsevents@1.0.12
  │       └─┬ node-pre-gyp@0.6.25
  │         └─┬ tar@2.2.1
  │           └─┬ fstream@1.0.8
  │             └── graceful-fs@4.1.3
  </code></pre>
  
  <p>I've tried <code>npm update -g graceful-fs</code> but this doesn't work, what is the proper way to uppgrade a package that is a dependency of a global package?</p>
  
  <p>Just to be clear: I don't want to globally install the <code>graceful-fs</code> package;  rather, I want to upgrade the installation of <code>graceful-fs</code> that is used by the <code>pouchdb-server</code> package.</p>