Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You have to install the module locally, not globally. That means you must <em>NOT</em> use the <code>-g</code> option when installing using npm.</p> <p>In Node.js, basically each application needs to have all of its dependencies in a local <code>node_modules</code> folder. You achieve this by installing node-mongoskin using:</p> <pre><code>$ npm install mongoskin </code></pre> <p>Global installation is only to provide system-wide binaries, such as a debugger, a testing tool or the bootstrapper of Express. This means, when you install a module globally, you can call its binaries from everywhere in your system, but for an application to work you need to install it locally.</p> <p>For applications, globally installed modules do not matter at all (and that's what your <code>ls</code> command shows: The globally installed modules).</p> <p>Hope this helps.</p> <p>PS: Please note that this distinction between local and global installs is related to any module, not only to mongoskin.</p> <p>PPS: You might want to check out the <code>package.json</code> file, where you can put your dependencies into, so that you can automatically install them at once using a simple <code>npm install</code>. To interactively create such a <code>package.json</code> file, see the <a href="https://npmjs.org/doc/init.html" rel="nofollow noreferrer">npm init</a> command.</p> <p>PPPS: Please also see my answer on <a href="https://stackoverflow.com/questions/15266380/getting-error-while-using-express-with-node-js">Getting error while using Express with Node.js</a>, it may help you to further understand what all this is about.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload