title: NodeJS, NPM, and package.json dependencies
body: <p>After reading npm-json (<code>npm help json</code>), I have construct the <code>package.json</code> file as follows: <code>{"name": "app name", "version": "0.1"}</code>. The directory has the following structure:</p>
  
  <pre><code>/
  |-- main.js
  |-- package.json
  </code></pre>
  
  <p>I am familiar with <a href="https://stackoverflow.com/questions/12955597/node-js-do-i-need-to-reinstall-all-the-modules-on-the-production-server-when-d">Node.js - do I need to reinstall all the modules on the production server when deploying the Node.js app</a>, thus I have tried to install the dependencies by executing <code>npm install moduleDep --save</code>, but I am getting the following error:</p>
  
  <pre><code>0 info it worked if it ends with ok
  1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'jquery', '--save' ]
  2 info using npm@1.2.2
  3 info using node@v0.8.18
  4 verbose read json /home/roth/develop/build/package.json
  5 error Error: invalid version: 1
  5 error     at validVersion (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:582:40)
  5 error     at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:342:23)
  5 error     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:140:33
  5 error     at cb (/usr/local/lib/node_modules/npm/node_modules/slide/lib/async-map.js:48:11)
  5 error     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:48
  5 error     at fs.js:117:20
  5 error     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:53:5
  5 error     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:62:5
  5 error     at Object.oncomplete (fs.js:297:15)
  6 error If you need help, you may report this log at:
  6 error     &lt;http://github.com/isaacs/npm/issues&gt;
  6 error or email it to:
  6 error     &lt;npm-@googlegroups.com&gt;
  7 error System Linux 3.1.10-1.16-desktop
  8 error command "node" "/usr/local/bin/npm" "install" "jquery" "--save"
  9 error cwd /home/roth/develop/build
  10 error node -v v0.8.18
  11 error npm -v 1.2.2
  12 verbose exit [ 1, true ]
  </code></pre>
  
  <p>Before I can run the <code>main</code> module, I have to use NPM for installing the dependencies.
  Is there any command which I can execute that will install and then add the dependency to the <code>package.json</code>? A thorough explanation will be great.</p>