title: E404 when trying to link local npm module
body: <p>I am getting a 404 error when trying to link a local module with <code>npm</code> following the <a href="https://docs.npmjs.com/cli/link" rel="nofollow noreferrer">docs</a></p>
  
  <p>Inside the local module directory seems like it creates a global link correctly:</p>
  
  <pre><code>$ npm link
  /usr/local/lib/node_modules/my-module-name -&gt; /Users/XXX/my-module-directory/my-module-name
  </code></pre>
  
  <p>But when just after that I try to link this from other project directory i get an 404 error:</p>
  
  <pre><code>$ npm link my-module-name
  npm ERR! code E404
  npm ERR! 404 Not Found: my-module-name@latest
  </code></pre>
  
  <p>I've tried to unlink the module and link again or change versions but it doesn't work.</p>
  
  <p>Here is full log:</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ '/Users/XXX/.nvm/versions/node/v8.2.1/bin/node',
  1 verbose cli   '/Users/XXX/.nvm/versions/node/v8.2.1/bin/npm',
  1 verbose cli   'link',
  1 verbose cli   'my-module-name' ]
  2 info using npm@5.3.0
  3 info using node@v8.2.1
  4 verbose npm-session 7d82e8d8dc1bdc83
  5 silly install loadCurrentTree
  6 silly install readGlobalPackageData
  7 http fetch GET 404 https://registry.npmjs.org/my-module-name 2304ms
  8 silly fetchPackageMetaData error for my-module-name@latest 404 Not Found: my-module-name@latest
  9 verbose stack Error: 404 Not Found: my-module-name@latest
  9 verbose stack     at fetch.then.res (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:41:19)
  9 verbose stack     at tryCatcher (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
  9 verbose stack     at Promise._settlePromiseFromHandler (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
  9 verbose stack     at Promise._settlePromise (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
  9 verbose stack     at Promise._settlePromise0 (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
  9 verbose stack     at Promise._settlePromises (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
  9 verbose stack     at Async._drainQueue (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
  9 verbose stack     at Async._drainQueues (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
  9 verbose stack     at Immediate.Async.drainQueues (/Users/XXX/.nvm/versions/node/v8.2.1/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
  9 verbose stack     at runCallback (timers.js:781:20)
  9 verbose stack     at tryOnImmediate (timers.js:743:5)
  9 verbose stack     at processImmediate [as _immediateCallback] (timers.js:714:5)
  10 verbose cwd /Users/XXX/my-project-directory
  11 verbose Darwin 16.6.0
  12 verbose argv "/Users/XXX/.nvm/versions/node/v8.2.1/bin/node" "/Users/XXX/.nvm/versions/node/v8.2.1/bin/npm" "link" "my-module-name"
  13 verbose node v8.2.1
  14 verbose npm  v5.3.0
  15 error code E404
  16 error 404 Not Found: my-module-name@latest
  17 verbose exit [ 1, true ]
  </code></pre>