title: How to enable code completion with a Node.js library in GLOBAL scope in Intellij?
body: <p>I installed mongodb node library globally with npm and tried referencing that library in Intellij and in my project to get code completion.  I believe I set this up correctly (see screenshots) and yet Intellij still doesn't give me code completion and complains that the module is not installed.  What am I missing?</p>
  
  <p>Note I don't want to install the module locally for this exercise, I want to use the global library, not a local one. </p>
  
  <p><a href="https://i.stack.imgur.com/pFNfR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pFNfR.png" alt="my npm setup in intellij"></a></p>
  
  <p><a href="https://i.stack.imgur.com/w2HFZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w2HFZ.png" alt="my javascript setup in intellij"></a></p>
  
  <p><a href="https://i.stack.imgur.com/k3MTt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k3MTt.png" alt="the error message in the editor"></a></p>