title: reduce size of node_modules for production
body: <p>I created node_modules for uploading addon to online site from localhost with help of ngrok and using <strong>npm install</strong> in CommandPrompt. But the created node_modules folder size was 78mb. In that case i must reduce the size by removing the unwanted folders, so I surfed the internet and got two suggestions, as it could be efficient to get size reduced, they are: using <strong>--production mode</strong> and the other is using <strong>shrinkwrap</strong>.</p>
  
  <p>As first step I used the command  <strong>npm install --production</strong> and <strong>npm install --only=production</strong> as specified here: <a href="https://stackoverflow.com/questions/9268259/how-do-you-prevent-install-of-devdependencies-npm-modules-for-node-js-package">How do you prevent install of &quot;devDependencies&quot; NPM modules for Node.js (package.json)?</a>, but I din't see any change in folder size.</p>
  
  <p>Then referred on how to use shrinkwrap to reduce size as given in this site and tried it: <a href="https://docs.npmjs.com/cli/shrinkwrap" rel="nofollow noreferrer">https://docs.npmjs.com/cli/shrinkwrap</a>, but it did not success.</p>
  
  <p>Additionally I referred here : <a href="https://www.npmjs.com/package/modclean" rel="nofollow noreferrer">https://www.npmjs.com/package/modclean</a>, where using the command <strong>modclean -n default:safe</strong> I got 10-11mb reduced.</p>
  
  <p>But, still I have a large number of unwanted folders in node_modules. I have specified few needed dependencies in package.json as follows,</p>
  
  <pre><code>"dependencies": {
      "atlassian-connect-express": "2.0.0",
      "body-parser": "^1.14.2",
      "compression": "^1.6.0",
      "cookie-parser": "^1.4.0",
      "errorhandler": "^1.4.2",
      "express": "^4.13.3",
      "express-hbs": "*",
      "jugglingdb-sqlite3": "0.0.5",
      "morgan": "^1.6.1",
      "static-expiry": "&gt;=0.0.5"
  }
  </code></pre>
  
  <p>The dependencies I have given in package.json is few, but I see a large sets of folders created in node_modules. How can I reduce the size of node_modules, is there any other process?</p>